berryccc1/EVM-QuestBench huggingface dataset:
Query ERC20 Token Balance
Category: basic_transactions / queries
Difficulty: easy
Chain: BSC (mainnet)

Query the ERC20 token balance of a specific address by calling the balanceOf function.

Technical context:
- Use contract.balanceOf(address) to query token balance
- The return value is in token's smallest unit (considering decimals)
- This is a read-only view function, no transaction is required
- Balance should be returned as uint256

Key considerations:
- Create contract instance with token address and ERC20 ABI
- Call balanceOf(address) view function
- Return both raw balance (in wei/smallest unit) and human-readable balance
- Consider token decimals when converting to human-readable format

Example requests:
Query the {token_symbol} balance of address {query_address}
Check the {token_symbol} token balance for {query_address}
Get the balance of {token_symbol} (token address: {token_address}) for {query_address}
What is the {token_symbol} balance of address {query_address}?
Query NFT Approval Status
Category: basic_transactions / queries
Difficulty: easy
Chain: BSC (mainnet)

Query the approved address for a specific NFT token ID before transfer

Example requests:
Check who is approved to transfer NFT token #{token_id} from the {nft_symbol} collection at {nft_address}
Query the approval status for NFT #{token_id} in the {nft_symbol} collection
Find out which address is authorized to manage NFT token {token_id} from contract {nft_address}
Get the approved operator for token ID {token_id} in the NFT collection {nft_symbol}
Query Token Metadata
Category: basic_transactions / token_info_queries
Difficulty: easy
Chain: BSC (mainnet)

Query comprehensive metadata of an ERC20 token by calling multiple view functions: name(), symbol(), decimals(), and totalSupply(). This demonstrates batch querying capabilities and handling of standard ERC20 token information. Note that some non-standard tokens may not implement all these functions, so proper error handling is important.

Example requests:
Query the metadata for token at {{token_address}} including name, symbol, decimals, and total supply
Get comprehensive information about the ERC20 token at {{token_address}}
Retrieve token details (name, symbol, decimals, totalSupply) for {{token_address}}
Check the basic information of token {{token_address}}
Query Token Total Supply
Category: basic_transactions / token_info_queries
Difficulty: easy
Chain: BSC (mainnet)

Query the total supply of an ERC20 token by calling the totalSupply() function. The total supply represents the total amount of tokens that exist, returned in the smallest unit (wei). Understanding decimals is crucial for proper display of the human-readable total supply.

Example requests:
Query the total supply of token at {{token_address}}
Get the total supply for the ERC20 token at {{token_address}} with {{token_decimals}} decimals
Check how many tokens exist in total for {{token_address}}
Retrieve the totalSupply of token {{token_address}}
PancakeSwap Add Liquidity - BNB + Token
Category: defi_operations / pancakeswap_liquidity
Difficulty: medium
Chain:  (bsc)

Add liquidity to a BNB/Token pair on PancakeSwap V2. IMPORTANT: You must query the pair's current reserves first using Factory.getPair() to get the pair address, then call pair.getReserves() to get reserve amounts. Calculate the optimal token amount using the formula: optimalTokenAmount = (amountBNB × reserveToken) / reserveWBNB. Then calculate amountTokenMin and amountETHMin by applying slippage tolerance (subtract slippage % from desired amounts). Use addLiquidityETH function with these parameters: token address, amountTokenDesired (the optimal amount), amountTokenMin, amountETHMin, recipient address, and deadline. CRITICAL: This is a payable function - you must set the transaction value field to the BNB amount you're adding.

Example requests:
Add {amount_bnb} BNB and {amount_token} {token_symbol} as liquidity to PancakeSwap
Provide liquidity to PancakeSwap: {amount_bnb} BNB + {amount_token} {token_symbol}
Deposit {amount_bnb} BNB and {amount_token} {token_symbol} into PancakeSwap liquidity pool
Add liquidity pair on PancakeSwap: {amount_bnb} BNB paired with {amount_token} {token_symbol}
PancakeSwap Add Liquidity - Token + Token
Category: defi_operations / pancakeswap_liquidity
Difficulty: medium
Chain:  (bsc)

Add liquidity to a Token/Token pair on PancakeSwap V2. IMPORTANT: You must query the pair's current reserves first using Factory.getPair() to get the pair address, then call pair.getReserves() to get reserve amounts. Determine which token is token0 and which is token1 by calling pair.token0(). Calculate the optimal amount for tokenB using the formula: optimalAmountB = (amountA × reserveB) / reserveA (adjust based on which token you're using as the base). Then calculate amountAMin and amountBMin by applying slippage tolerance (subtract slippage % from desired amounts). CRITICAL: Both tokens must be approved for the Router before calling addLiquidity. Use addLiquidity function with these parameters: tokenA address, tokenB address, amountADesired, amountBDesired, amountAMin, amountBMin, recipient address, and deadline. This is NOT a payable function - do not send BNB value.

Example requests:
Add {amount_token_a} {token_a_symbol} and {amount_token_b} {token_b_symbol} as liquidity to PancakeSwap
Provide liquidity to PancakeSwap: {amount_token_a} {token_a_symbol} + {amount_token_b} {token_b_symbol}
Deposit {amount_token_a} {token_a_symbol} and {amount_token_b} {token_b_symbol} into PancakeSwap liquidity pool
Add liquidity pair on PancakeSwap: {amount_token_a} {token_a_symbol} paired with {amount_token_b} {token_b_symbol}
PancakeSwap Remove Liquidity - BNB + Token
Category: defi_operations / pancakeswap_liquidity
Difficulty: medium
Chain:  (bsc)

Remove liquidity from a BNB/Token pair on PancakeSwap V2.

This task requires:
1. Query the LP token address for the WBNB/Token pair from PancakeSwap Factory using Factory.getPair(WBNB, token)
2. Check your current LP token balance using LPToken.balanceOf(agent)
3. Calculate the liquidity amount to remove based on percentage: liquidity = (balance × percentage) / 100
4. Query the pair's reserves using Pair.getReserves() and total supply using Pair.totalSupply()
5. Determine which reserve is WBNB and which is Token by comparing Pair.token0() with addresses
6. Estimate output amounts: amountToken = (liquidity × reserveToken) / totalSupply, amountETH = (liquidity × reserveWBNB) / totalSupply
7. Calculate minimum amounts with slippage tolerance: amountTokenMin = estimatedToken × (100 - slippage) / 100, amountETHMin = estimatedETH × (100 - slippage) / 100
8. Ensure LP tokens are approved for the Router (check allowance and approve if needed)
9. Call Router.removeLiquidityETH(token, liquidity, amountTokenMin, amountETHMin, to, deadline)

Key PancakeSwap V2 Router function:
- removeLiquidityETH(address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline) returns (uint amountToken, uint amountETH)

IMPORTANT:
- This is NOT a payable function - don't send BNB value with the transaction
- You MUST approve the Router to spend your LP tokens before calling removeLiquidityETH
- The LP token is the PancakeSwap pair contract for WBNB/Token
- Use WBNB address (0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c) when querying the Factory
- Set a reasonable deadline (e.g., current timestamp + 20 minutes)
- The 'to' address should be the agent's address to receive both Token and BNB
- After removing liquidity, you'll receive the Token and BNB directly

Contract Addresses (BSC Mainnet):
- PancakeSwap Router V2: 0x10ED43C718714eb63d5aA57B78B54704E256024E
- PancakeSwap Factory: 0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73
- WBNB: 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c

Example:
- If you have 2.0 LP tokens and want to remove 50%:
  - liquidity = 2.0 × 0.5 = 1.0 LP tokens
- If pool has 1000 WBNB, 500,000 USDT, and 100 total LP supply:
  - You'll get: (1.0 × 1000) / 100 = 10 BNB
  - You'll get: (1.0 × 500,000) / 100 = 5,000 USDT
- With 5% slippage:
  - amountETHMin = 10 × 0.95 = 9.5 BNB
  - amountTokenMin = 5,000 × 0.95 = 4,750 USDT

Example requests:
Remove {liquidity_percentage}% of my liquidity from the BNB/{token_symbol} pool on PancakeSwap
Withdraw liquidity from PancakeSwap: {liquidity_percentage}% from BNB-{token_symbol} pair
Remove {liquidity_percentage}% LP tokens from the BNB/{token_symbol} liquidity pool
Remove Liquidity from Token-Token Pool
Category: defi_operations / pancakeswap_liquidity
Difficulty: medium
Chain:  (bsc_mainnet)

Remove liquidity from a PancakeSwap V2 pool with two ERC20 tokens (Token A + Token B).

This task requires:
1. Query the LP token address for the Token A/Token B pair from PancakeSwap Factory
2. Check current LP token balance
3. Calculate the liquidity amount to remove (can be a fixed amount or percentage)
4. Query the pair's reserves to estimate how many Token A and Token B you'll receive
5. Calculate minimum amounts (amountAMin, amountBMin) with slippage protection
6. Ensure LP tokens are approved for the Router
7. Call removeLiquidity(tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline)

Key PancakeSwap V2 Router function:
- removeLiquidity(address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline) returns (uint amountA, uint amountB)

Important:
- You need to APPROVE the Router to spend your LP tokens before calling removeLiquidity
- Use Factory.getPair(tokenA, tokenB) to get the LP token address
- Use Pair.getReserves() to estimate output amounts
- Calculate minimum amounts: amountMin = (estimatedAmount * (100 - slippage)) / 100
- Set a reasonable deadline (e.g., 20 minutes from now)
- The 'to' address should be the agent's address to receive the tokens

Contract Addresses (BSC Mainnet):
- PancakeSwap Router V2: 0x10ED43C718714eb63d5aA57B78B54704E256024E
- PancakeSwap Factory: 0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73

Steps:
1. Get the LP token address: Factory.getPair(tokenA, tokenB)
2. Check LP balance: LPToken.balanceOf(agent)
3. Approve LP tokens: LPToken.approve(Router, liquidity)
4. Get pair reserves: Pair.getReserves() and Pair.totalSupply()
5. Estimate outputs: amountA = (liquidity * reserveA) / totalSupply, similar for amountB
6. Calculate mins with slippage: amountAMin = amountA * (100 - slippage%) / 100
7. Call Router.removeLiquidity(tokenA, tokenB, liquidity, amountAMin, amountBMin, agent, deadline)

Example calculation:
- If you have 1.5 LP tokens and want to remove 50%:
  - liquidity = 1.5 * 0.5 = 0.75 LP tokens
- If pool has 1000 Token A, 2000 Token B, 10 total LP supply:
  - You'll get: (0.75 * 1000) / 10 = 75 Token A
  - You'll get: (0.75 * 2000) / 10 = 150 Token B
- With 5% slippage:
  - amountAMin = 75 * 0.95 = 71.25
  - amountBMin = 150 * 0.95 = 142.5

Example requests:
Remove liquidity from the {token_a_symbol}/{token_b_symbol} pool on PancakeSwap
Withdraw {liquidity_percentage}% of my liquidity from the {token_a_symbol}-{token_b_symbol} pool
Remove {liquidity_amount} LP tokens from the {token_a_symbol}/{token_b_symbol} pool
Query PancakeSwap Pair Reserves
Category: defi_operations / pancakeswap_queries
Difficulty: easy
Chain: BSC (mainnet)

Query the reserve amounts of both tokens in a PancakeSwap liquidity pair

Example requests:
Get the reserves of the {token0_symbol}/{token1_symbol} pair at {pair_address}
Query the liquidity reserves for pair {pair_address}
Check the reserve0 and reserve1 for the PancakeSwap pair {pair_address}
What are the current reserves of the {token0_symbol}/{token1_symbol} liquidity pair?
Query Swap Input Amount
Category: defi_operations / pancakeswap_queries
Difficulty: medium
Chain: BSC (mainnet)

Calculate the required input amount to achieve a target output amount before executing a swap on PancakeSwap. This involves calling the Router's getAmountsIn function with the desired output amount and token path.

Example requests:
Query how much {{token_in_symbol}} is needed to get exactly {{amount_out}} {{token_out_symbol}} on PancakeSwap
Calculate the input amount required to receive {{amount_out}} {{token_out_symbol}} when swapping from {{token_in_symbol}}
Check how much {{token_in_symbol}} tokens are needed to get {{amount_out}} {{token_out_symbol}} via PancakeSwap Router at {{router_address}}
Get the required input amount for swapping to receive exactly {{amount_out}} {{token_out_symbol}}, starting from {{token_in_symbol}}
Query Swap Output Amount
Category: defi_operations / pancakeswap_queries
Difficulty: medium
Chain: BSC (mainnet)

Query the expected output amount for a token swap before executing the trade

Example requests:
Calculate how much {token_out_symbol} you will receive for {amount_in} {token_in_symbol} on PancakeSwap
Query the output amount for swapping {amount_in} {token_in_symbol} to {token_out_symbol}
Get the estimated output for a {token_in_symbol} to {token_out_symbol} swap with input amount {amount_in}
What is the expected output for swapping {amount_in} {token_in_symbol} for {token_out_symbol}?
PancakeSwap Swap - BNB to Token
Category: defi_operations / pancakeswap_swap
Difficulty: easy
Chain: BSC (mainnet)

Swap BNB for ERC20 tokens using PancakeSwap V2 Router's swapExactETHForTokens function.

Technical context:
- PancakeSwap V2 Router (BSC Mainnet): 0x10ED43C718714eb63d5aA57B78B54704E256024E
- Function signature: swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts)
- This is a payable function that requires sending BNB with the transaction
- The swap follows Uniswap V2 AMM (Automated Market Maker) model: x * y = k
- Function selector: 0x7ff36ab5
- Recommended gas limit: 200000

Key considerations:
- amountOutMin: Minimum amount of tokens to receive (slippage protection)
- path: Array of token addresses for the swap route [WBNB, TOKEN]
- to: Recipient address (usually the sender/agent address)
- deadline: Unix timestamp after which the transaction will revert
- Must set transaction 'value' field to the BNB amount being swapped
- WBNB address on BSC: 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c

Slippage protection:
- Calculate amountOutMin using getAmountsOut or apply a percentage (2-5% typical)
- Formula: amountOutMin = expectedOutput * (1 - slippagePercent)
- For testing, can use 0 for amountOutMin (accepts any output)

Success criteria:
- Transaction executes successfully
- Correct PancakeSwap Router is called
- BNB balance decreases by amountIn (plus gas)
- Token balance increases by at least amountOutMin

Example requests:
Swap {amount_in} BNB for {token_symbol} tokens on PancakeSwap
Exchange {amount_in} BNB to {token_symbol} using PancakeSwap Router
Convert {amount_in} BNB to {token_symbol} tokens through PancakeSwap V2
Trade {amount_in} BNB for {token_symbol} on PancakeSwap with {slippage}% slippage tolerance
PancakeSwap Swap - Token to BNB
Category: defi_operations / pancakeswap_swap
Difficulty: medium
Chain: BSC (mainnet)

Swap ERC20 tokens for BNB using PancakeSwap V2 Router's swapExactTokensForETH function.

Technical context:
- PancakeSwap V2 Router (BSC Mainnet): 0x10ED43C718714eb63d5aA57B78B54704E256024E
- Function signature: swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts)
- This function requires prior token approval to the Router contract
- The swap follows Uniswap V2 AMM (Automated Market Maker) model: x * y = k
- Function selector: 0x18cbafe5
- Recommended gas limit: 180000

Key considerations:
- MUST approve tokens to Router before calling swap function
- amountIn: Exact amount of tokens to swap
- amountOutMin: Minimum amount of BNB to receive (slippage protection)
- path: Array of token addresses for the swap route [TOKEN, WBNB]
- to: Recipient address (usually the sender/agent address)
- deadline: Unix timestamp after which the transaction will revert
- WBNB address on BSC: 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c

Two-step process:
1. Call approve(router, amountIn) on the token contract
2. Call swapExactTokensForETH on the router contract

Slippage protection:
- Calculate amountOutMin using getAmountsOut or apply a percentage (2-5% typical)
- Formula: amountOutMin = expectedOutput * (1 - slippagePercent)
- For testing, can use 0 for amountOutMin (accepts any output)

Success criteria:
- Transaction executes successfully
- Correct PancakeSwap Router is called
- Token balance decreases by amountIn
- BNB balance increases by at least amountOutMin (minus gas)

Example requests:
Swap {amount_in} {token_symbol} for BNB on PancakeSwap
Exchange {amount_in} {token_symbol} to BNB using PancakeSwap Router
Convert {amount_in} {token_symbol} tokens to BNB through PancakeSwap V2
Trade {amount_in} {token_symbol} for BNB on PancakeSwap with {slippage}% slippage tolerance
PancakeSwap Swap - Token to Token
Category: defi_operations / pancakeswap_swap
Difficulty: medium
Chain: BSC (mainnet)

Swap one ERC20 token for another using PancakeSwap V2 Router's swapExactTokensForTokens function.

Technical context:
- PancakeSwap V2 Router (BSC Mainnet): 0x10ED43C718714eb63d5aA57B78B54704E256024E
- Function signature: swapExactTokensForTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts)
- This function requires prior token approval to the Router contract
- The swap follows Uniswap V2 AMM (Automated Market Maker) model: x * y = k
- Function selector: 0x38ed1739
- Recommended gas limit: 200000

Key considerations:
- MUST approve input tokens to Router before calling swap function
- amountIn: Exact amount of input tokens to swap
- amountOutMin: Minimum amount of output tokens to receive (slippage protection)
- path: Array of token addresses for the swap route
- to: Recipient address (usually the sender/agent address)
- deadline: Unix timestamp after which the transaction will revert

Swap path considerations:
- Direct path: [TOKEN_IN, TOKEN_OUT] if liquidity pool exists
- Multi-hop path: [TOKEN_IN, WBNB, TOKEN_OUT] if direct pool doesn't exist or has low liquidity
- WBNB address on BSC: 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c
- Most token pairs route through WBNB for better liquidity

Two-step process:
1. Call approve(router, amountIn) on the input token contract
2. Call swapExactTokensForTokens on the router contract

Slippage protection:
- Calculate amountOutMin using getAmountsOut or apply a percentage (2-5% typical)
- Formula: amountOutMin = expectedOutput * (1 - slippagePercent)
- For testing, can use 0 for amountOutMin (accepts any output)

Success criteria:
- Transaction executes successfully
- Correct PancakeSwap Router is called
- Input token balance decreases by amountIn
- Output token balance increases by at least amountOutMin

Example requests:
Swap {amount_in} {token_in_symbol} for {token_out_symbol} on PancakeSwap
Exchange {amount_in} {token_in_symbol} to {token_out_symbol} using PancakeSwap Router
Convert {amount_in} {token_in_symbol} tokens to {token_out_symbol} through PancakeSwap V2
Trade {amount_in} {token_in_symbol} for {token_out_symbol} on PancakeSwap with {slippage}% slippage tolerance
PancakeSwap Multi-hop Routing Swap
Category: defi_operations / pancakeswap_swap
Difficulty: hard
Chain:  (bsc)

Execute a multi-hop token swap on PancakeSwap Router V2. This operation involves swapping tokens through multiple intermediate tokens to achieve better liquidity and pricing. The swap path must be: CAKE → WBNB → USDT → BUSD (4 tokens). You must use the exact input amount specified in the task. Call getAmountsOut() first to estimate output amounts, then calculate amountOutMin with slippage tolerance. Use swapExactTokensForTokens function with the complete 4-token path.

Example requests:
Swap {amount_in} {token_start_symbol} for {token_end_symbol} on PancakeSwap using a multi-hop routing path through WBNB and USDT
Execute a multi-hop token swap: exchange {amount_in} {token_start_symbol} to {token_end_symbol} via intermediate tokens for better liquidity
Perform a complex token swap on PancakeSwap: {amount_in} {token_start_symbol} → WBNB → USDT → {token_end_symbol}
Use PancakeSwap Router to swap {amount_in} {token_start_symbol} for {token_end_symbol} with optimal multi-hop routing
PancakeSwap Swap - Exact Output (Token to Token)
Category: defi_operations / pancakeswap_swap
Difficulty: hard
Chain: BSC (mainnet)

Swap tokens to receive an exact amount of output tokens using PancakeSwap V2 Router's swapTokensForExactTokens function.

Technical context:
- PancakeSwap V2 Router (BSC Mainnet): 0x10ED43C718714eb63d5aA57B78B54704E256024E
- Function signature: swapTokensForExactTokens(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts)
- This is an EXACT OUTPUT swap (opposite of exact input)
- The swap follows Uniswap V2 AMM (Automated Market Maker) model: x * y = k
- Function selector: 0x8803dbee
- Recommended gas limit: 200000

Key considerations:
- amountOut: EXACT amount of output tokens desired (user specifies this)
- amountInMax: MAXIMUM amount of input tokens willing to spend (slippage protection)
- path: Array of token addresses for the swap route
- to: Recipient address (usually the sender/agent address)
- deadline: Unix timestamp after which the transaction will revert
- MUST approve sufficient tokens (at least amountInMax) to Router

Exact output vs exact input:
- Exact input: You know how much you're selling, output is variable
- Exact output: You know how much you want to buy, input is variable (up to amountInMax)
- This function is useful when you need a precise amount of output tokens
- Example: Buying exactly 100 USDT to pay for something

Two-step process:
1. Call getAmountsIn(amountOut, path) to estimate required input
2. Calculate amountInMax with slippage tolerance
3. Approve amountInMax (or more) to Router
4. Call swapTokensForExactTokens on the router contract

Slippage protection:
- Calculate amountInMax using getAmountsIn and apply slippage
- Formula: amountInMax = expectedInput * (1 + slippagePercent)
- The actual input used will be <= amountInMax
- For testing, can set high amountInMax to accept any input cost

Success criteria:
- Transaction executes successfully
- Correct PancakeSwap Router is called
- Output token balance increases by EXACTLY amountOut
- Input token balance decreases by <= amountInMax

Example requests:
Swap tokens to get exactly {amount_out} {token_out_symbol} on PancakeSwap
Exchange tokens for precisely {amount_out} {token_out_symbol} using PancakeSwap Router
Buy exactly {amount_out} {token_out_symbol} with {token_in_symbol} through PancakeSwap V2
Trade {token_in_symbol} for exactly {amount_out} {token_out_symbol} on PancakeSwap with {slippage}% max slippage
Emergency Withdraw from Staking Pool
Category: defi_operations / staking_farming
Difficulty: easy
Chain: BSC (mainnet)

Emergency withdraw all staked LP tokens from a farming pool, forfeiting all accumulated rewards. This is an emergency function to quickly retrieve staked assets without claiming rewards.

IMPORTANT: This is a SimpleRewardPool contract with emergencyWithdraw() function.
- Contract function: emergencyWithdraw() - NO PARAMETERS
- This function withdraws ALL staked LP tokens
- All pending rewards are FORFEITED (not claimed)
- User's staking record is completely cleared
- This is faster and uses less gas than normal withdraw

Required steps:
1. Query current staked amount: rewardPool.userInfo(user_address)
2. Query current LP token balance: lpToken.balanceOf(user_address)
3. Call emergencyWithdraw: rewardPool.emergencyWithdraw()
4. Verify ALL LP tokens are returned
5. Verify staked amount becomes 0
6. Verify rewards are NOT claimed (CAKE balance should not increase)

Contract details:
- SimpleRewardPool contract address: pool_address (dynamic parameter)
- Staking token: USDT/BUSD LP (0x7EFaEf62fDdCCa950418312c6C91Aef321375A00)
- Emergency withdraw function signature: emergencyWithdraw()
- NO amount parameter - withdraws everything
- Rewards are forfeited - this is the trade-off for emergency speed

To get the pool address from deployed contracts:
const poolAddress = deployedContracts['simple_reward_pool']

Function call construction:
```typescript
const SimpleRewardPoolABI = [
  'function emergencyWithdraw() external'
];
const contract = new Contract interface(poolAddress, SimpleRewardPoolABI, provider);
const data = encode the function call('emergencyWithdraw', []);
```

Common mistakes to avoid:
- DO NOT pass any parameters to emergencyWithdraw()
- DO understand that rewards will be lost
- DO verify that CAKE balance does NOT increase (rewards forfeited)
- This is meant for emergency situations only

Example requests:
Emergency withdraw all staked LP tokens from the pool at {pool_address}
Quickly retrieve all LP tokens from staking pool {pool_address} (forfeit rewards)
Execute emergency withdrawal from farming pool {pool_address}
Unstake all USDT/BUSD LP tokens immediately, forfeiting CAKE rewards
Harvest Farming Rewards
Category: defi_operations / staking_farming
Difficulty: medium
Chain: BSC (mainnet)

Harvest (claim) accumulated farming rewards from a staking pool. This operation collects the rewards earned from staking without unstaking the principal.

IMPORTANT: This is a SimpleRewardPool contract with a harvest() function.
- Contract function: harvest() - NO PARAMETERS
- This function claims all pending rewards for the caller
- The pool_address parameter is the SimpleRewardPool contract address
- Rewards are paid in CAKE tokens

Required steps:
1. Query pending rewards: rewardPool.pendingReward(user_address)
2. Check current CAKE balance: cakeToken.balanceOf(user_address)
3. Call harvest to claim rewards: rewardPool.harvest()
4. Verify CAKE balance increased

Contract details:
- SimpleRewardPool contract address: pool_address (dynamic parameter)
- Reward token: CAKE (0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82)
- Harvest function signature: harvest() - no parameters

To get the pool address from deployed contracts:
const poolAddress = deployedContracts['simple_reward_pool']

Function call construction:
```typescript
const SimpleRewardPoolABI = [
  'function harvest() external'
];
const contract = new Contract interface(poolAddress, SimpleRewardPoolABI, provider);
const data = encode the function call('harvest', []);
```

Common mistakes to avoid:
- DO NOT pass any parameters to harvest() - it's a parameterless function
- DO ensure you have pending rewards before harvesting
- DO check the reward token (CAKE) balance before and after

Example requests:
Harvest farming rewards from the pool at {pool_address}
Claim accumulated rewards from the farming pool
Collect farming rewards without unstaking
Harvest CAKE rewards from the staking pool
Stake LP Tokens to Farming Pool
Category: defi_operations / staking_farming
Difficulty: medium
Chain: BSC (mainnet)

Stake LP (Liquidity Provider) tokens to a SimpleLPStaking farming pool to earn rewards. LP tokens are obtained by providing liquidity to a DEX pair (e.g., USDT/BUSD on PancakeSwap).

IMPORTANT: This is a SimpleLPStaking contract, NOT a MasterChef-style contract.
- Contract function: deposit(uint256 _amount) - ONLY ONE PARAMETER
- NO pool ID parameter required (unlike MasterChef)
- The pool_address parameter is the SimpleLPStaking contract address

Required steps:
1. Check LP token balance: lpToken.balanceOf(user_address)
2. Check current allowance: lpToken.allowance(user_address, pool_address)
3. If allowance is insufficient, approve the pool: lpToken.approve(pool_address, amount)
4. Stake LP tokens: simpleLPStaking.deposit(amount)

Contract details:
- SimpleLPStaking contract address: pool_address (dynamic parameter)
- LP token address: lp_token_address (USDT/BUSD pair: 0x7EFaEf62fDdCCa950418312c6C91Aef321375A00)
- Deposit function signature: deposit(uint256 _amount)
- Amount unit: wei (e.g., 0.5 LP tokens = 500000000000000000 wei)

Function call construction:
```typescript
const SimpleLPStakingABI = [
  'function deposit(uint256 _amount) external'
];
const contract = new Contract interface(pool_address, SimpleLPStakingABI, provider);
const data = encode the function call('deposit', [amountInWei]);
```

Common mistakes to avoid:
- DO NOT use deposit(uint256 _pid, uint256 _amount) - this is MasterChef, not SimpleLPStaking
- DO NOT pass a pool ID parameter
- DO ensure the LP token is approved before calling deposit
- DO convert the stake_amount to wei (multiply by 10^18)

Example requests:
Stake {stake_amount} USDT/BUSD LP tokens in the SimpleLPStaking pool
Deposit {stake_amount} LP tokens to the LP staking pool to earn farming rewards
Stake {stake_amount} USDT/BUSD LP tokens using the simple_lp_staking contract
Put {stake_amount} liquidity provider tokens into the LP staking pool to start earning
Stake Single Token to Syrup Pool
Category: defi_operations / staking_farming
Difficulty: medium
Chain: BSC (mainnet)

Stake CAKE tokens to a PancakeSwap Syrup Pool to earn rewards. This operation requires approving the Syrup Pool contract to spend your CAKE tokens, then calling the deposit function with the pool ID and amount. You need to query the pool information to get the staking token address and ensure you have sufficient balance and allowance.

Example requests:
Stake {stake_amount} CAKE tokens in the SimpleStaking pool
Deposit {stake_amount} CAKE to the simple_staking contract to earn rewards
Put {stake_amount} CAKE tokens into the single-token staking pool
Stake {stake_amount} CAKE in the single token farming pool to start earning
Unstake LP Tokens from Farming Pool
Category: defi_operations / staking_farming
Difficulty: medium
Chain: BSC (mainnet)

Withdraw (unstake) LP tokens from a farming pool. This operation retrieves your staked LP tokens back to your wallet.

Technical context:
- Uses SimpleRewardPool contract's withdraw() function
- Function signature: withdraw(uint256 _amount)
- The withdraw function will also automatically harvest any pending rewards
- LP tokens are returned to the user's wallet
- Staked balance in the pool decreases by the withdrawal amount

Key considerations:
- Amount must not exceed the staked balance
- Amount must be in wei (18 decimals for LP tokens)
- Can withdraw partial or full staked amount
- The pool automatically harvests rewards during withdrawal

Implementation steps:
1. Query current staked amount: rewardPool.userInfo(user_address)
2. Ensure unstake amount <= staked amount
3. Call withdraw: rewardPool.withdraw(amountInWei)
4. Verify LP token balance increased by unstake amount
5. Verify staked amount decreased by unstake amount

Example requests:
Unstake {unstake_amount} USDT/BUSD LP tokens from the SimpleRewardPool
Withdraw {unstake_amount} LP tokens from the simple_reward_pool contract
Remove {unstake_amount} LP tokens from the reward pool staking
Unstake {unstake_amount} USDT/BUSD LP tokens from the reward distribution pool
Query Pending Rewards
Category: defi_operations / staking_queries
Difficulty: medium
Chain: BSC (mainnet)

Query the pending rewards earned by a user in a staking pool. This involves calling the SimpleRewardPool contract's pendingReward function to retrieve the accumulated rewards that can be harvested. Rewards accumulate over time based on the user's staked amount and the pool's reward rate.

Example requests:
Query the pending rewards for address {{query_address}} in the SimpleRewardPool
Check how much rewards {{query_address}} has earned in the reward pool at {{pool_address}}
Get the accumulated rewards for user {{query_address}} from the SimpleRewardPool contract
Retrieve pending CAKE rewards for address {{query_address}} that can be harvested
Query Staked Amount
Category: defi_operations / staking_queries
Difficulty: easy
Chain: BSC (mainnet)

Query the staked amount of a user in a staking contract. This involves calling the staking contract's userInfo function to retrieve the user's staked balance and deposit time.

Example requests:
Query the staked amount for address {{query_address}} in the SimpleStaking contract
Check how much {{query_address}} has staked in the staking pool at {{pool_address}}
Get the staked balance for user {{query_address}} from the SimpleStaking contract
Retrieve staking information for address {{query_address}} including amount and deposit time