evm_stake_lp
Stake LP tokens in EVM yield farms to earn farming rewards. Automatically approves tokens, deposits them into staking contracts, and returns transaction details.
Instructions
Stake LP tokens in yield farms to earn farming rewards.
Deposits liquidity provider (LP) tokens into farming contracts to earn additional yield beyond trading fees. Automatically approves LP tokens before staking.
CRITICAL RULES:
Must hold LP tokens to stake
Requires gas in native token
Must approve LP tokens for farm contract
Staked LP tokens cannot be used elsewhere
Transaction irreversible once confirmed
PARAMETERS:
chain: EVM chain to execute on (required)
Farm must be deployed on this chain
Requires gas in native token
protocol: Yield farming protocol (required)
Examples: "uniswap", "sushiswap", "curve", "pancakeswap"
Must support the LP token
lpToken: LP token address to stake (required)
Format: 0x followed by 40 hex characters
Must be valid ERC-20 LP token
amount: Amount of LP tokens to stake (required)
Human-readable format: "100" = 100 LP tokens
Must have sufficient balance
privateKey: Transaction signer's private key (required, KEEP SECRET)
Must be address holding LP tokens
Never expose, share, or log
poolId: Pool/Farm ID (optional)
Required for protocols with multiple farms
Check protocol docs for pool IDs
EXAMPLES: ✅ Stake LP tokens on SushiSwap: {chain: "polygon", protocol: "sushiswap", lpToken: "0x...", amount: "100", privateKey: "0xac0974...", poolId: 0}
✅ Stake on Curve (no poolId): {chain: "ethereum", protocol: "curve", lpToken: "0x...", amount: "50.5", privateKey: "0x..."}
✅ Stake on PancakeSwap: {chain: "bsc", protocol: "pancakeswap", lpToken: "0x...", amount: "1000", privateKey: "0x...", poolId: 12}
❌ Invalid - insufficient LP tokens: {amount: "1000"} // Only have 100 LP tokens
❌ Invalid - missing poolId for multi-pool protocol: {chain: "polygon", protocol: "sushiswap", lpToken: "0x...", amount: "100", privateKey: "0x..."} // Need poolId
SUPPORTED EVM CHAINS (7 networks): • ethereum (Sepolia) - EIP-1559 enabled, ~12s blocks, moderate gas costs • polygon (Amoy) - Low fees, fast finality (~2s), layer 2 • avalanche (Fuji C-Chain) - Sub-second finality, dynamic fees • bsc (BNB Testnet) - 3s blocks, low gas costs, Binance ecosystem • arbitrum (Sepolia) - Optimistic rollup, low fees, Ethereum security • base (Sepolia) - Coinbase layer 2, EIP-1559, low fees • worldchain (World Sepolia) - World Network testnet, EIP-1559
CRITICAL GAS CONSIDERATIONS:
Ethereum: High gas costs, use gas oracle for timing
Polygon/BSC: Very low gas, safe for frequent transactions
Arbitrum/Base: L2 optimizations, ~10-50x cheaper than Ethereum
Avalanche: Dynamic fees, can spike during congestion
Always check gas price before executing transactions
TESTNET TOKENS: All chains use testnet tokens with NO REAL VALUE. Faucets available for all supported networks.
OUTPUT STRUCTURE: • success: Boolean indicating staking success • transactionHash: Transaction hash for tracking • lpTokenStaked: Amount of LP tokens staked • farmingContract: Farm contract address • estimatedAPY: Expected farming APY • gasUsed: Gas consumed • executionTime: Time taken in milliseconds
COMMON MISTAKES:
Not having gas for transaction
Forgetting LP tokens need approval
Wrong poolId for farm
Staking when better yields available elsewhere
Not tracking staked positions
USE CASES:
Maximize LP token yield
Earn farming rewards
Participate in liquidity mining
Access protocol governance tokens
Bootstrap new DEX pairs
SUPPORTED PROTOCOLS:
Uniswap: V2 and V3 farming
SushiSwap: MasterChef farms
Curve: Gauge staking
QuickSwap: Dragon's Lair
Balancer: Gauge staking
TraderJoe: MasterChef farms
Pangolin: PNG rewards
PancakeSwap: Syrup pools
Biswap: Farming pools
Camelot: Nitro pools
BaseSwap: Farming
Aerodrome: Gauges
STAKING PROCESS:
Check LP token balance
Approve LP tokens for farm
Call stake/deposit function
Rewards start accruing immediately
Track position in farm
GAS COSTS:
Approval: 45,000-50,000 gas
Staking: 80,000-120,000 gas
Total: ~125,000-170,000 gas
Ethereum Sepolia: ~0.002-0.003 ETH
Polygon: ~0.00005 POL
BSC: ~0.0001 BNB
REWARDS:
Accrued per block or second
Claimable anytime
May be auto-compounded
Often protocol governance tokens
Running on Linux.
LINUX-SPECIFIC NOTES:
Package manager: apt (Ubuntu/Debian), yum (RHEL/CentOS), or pacman (Arch)
Python 3 is typically 'python3' command
GNU tools are standard
Use 'xdg-open' command to open files/applications
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"chain": "<chain>",
"protocol": "<protocol>",
"lpToken": "<lpToken>",
"amount": "<amount>",
"privateKey": "<privateKey>"
},
"name": "evm_stake_lp"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | Yes | EVM chain to execute on | |
| amount | Yes | Amount of LP tokens to stake | |
| poolId | No | Pool/Farm ID for protocols with multiple pools | |
| lpToken | Yes | LP token address to stake | |
| protocol | Yes | Yield farming protocol (e.g., uniswap, sushiswap) | |
| privateKey | Yes | Private key for transaction |