Skip to content

farming-planner

Plugin: pancakeswap-farming · Model: Sonnet · Version: 1.0.0

Plan yield farming, CAKE staking, and reward harvesting on PancakeSwap.

Overview

This skill does not execute transactions — it plans farming strategies. The output is a deep link URL that opens the PancakeSwap interface at the relevant farming or staking page.

Farming Types

TypeHow It WorksReward
V2 FarmsStake LP tokens in MasterChef v2CAKE
V3 FarmsStake V3 NFT positions in MasterChef v3CAKE
Infinity FarmsProvide liquidity, CAKE allocated per 8h epoch via MerkleCAKE
Syrup PoolsStake CAKE to earn partner tokens or more CAKEVarious

Workflow

1. Gather Intent      → What does the user want? (farm, stake, harvest)
2. Identify Type      → V2, V3, Infinity, or Syrup Pool
3. Discover Farms     → Query active farms, APR data
4. Assess Opportunity → Compare yields, IL risk, lock duration
5. Generate Deep Link → Pre-filled PancakeSwap URL
6. Present Summary    → APR, risks, actionable link

Farm Discovery

Infinity Farms (CampaignManager)

Query the CampaignManager contract on BSC to discover active Infinity farm campaigns:

bash
cast call 0x26Bde0AC5b77b65A402778448eCac2aCaa9c9115 \
  "campaignLength()(uint256)" \
  --rpc-url https://bsc-dataseed1.binance.org

APR Data (DefiLlama)

bash
curl -s "https://yields.llama.fi/pools" | \
  jq '[.data[] | select(.project == "pancakeswap-amm-v3") | select(.chain == "BSC")]
      | sort_by(-.apy) | .[0:10]'

Reward Claiming (Infinity Farms)

Infinity farms distribute CAKE every 8 hours. Claiming uses a Merkle proof flow:

  1. Fetch proof from PancakeSwap API:
GET https://infinity.pancakeswap.com/farms/users/{chainId}/{address}/{timestamp}
  1. Call Distributor contract with the proof:
solidity
function claim(ClaimParams[] calldata claimParams) external;

Decision Guide

User Wants...Recommend
Passive yield, no ILCAKE staking
Highest APRV3 Farm with tight range
Set-and-forgetV2 Farm (full range)
Partner tokensSyrup Pools
Stablecoin yieldUSDT-USDC StableSwap LP farm
https://pancakeswap.finance/liquidity/pools     # All farms
https://pancakeswap.finance/pools              # Syrup Pools
https://pancakeswap.finance/cake-staking       # CAKE staking
https://pancakeswap.finance/liquidity/pools?type=1  # Infinity farms

Full Reference

See the source SKILL.md for the complete skill with contract addresses, token tables, and anti-patterns.

Released under the MIT License.