berryccc1/EVM-QuestBench huggingface dataset:
Add Token+Token Liquidity and Stake LP Tokens
Category: composite_problems / complete_workflow
Difficulty: hard

Complete LP farming workflow: add liquidity, approve LP, and stake.

This is a 3-step process:
1. Add USDT + BUSD liquidity using addLiquidity to receive LP tokens
2. Approve the staking contract to spend LP tokens
3. Stake LP tokens in the farming pool using deposit(uint256)

Technical details:
- PancakeSwap Router: 0x10ED43C718714eb63d5aA57B78B54704E256024E
- Token A: USDT (0x55d398326f99059fF775485246999027B3197955)
- Token B: BUSD (0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56)
- LP Token: USDT/BUSD LP (0x7EFaEf62fDdCCa950418312c6C91Aef321375A00)
- addLiquidity: 0xe8e33700
- SimpleLPStaking contract uses deposit(uint256 _amount)

IMPORTANT: The staking contract uses deposit(uint256) function.
The key operation is stake_lp_tokens since it's the final goal.

Example requests:
Add liquidity with {amount_a} {token_a_symbol} and {amount_b} {token_b_symbol}, then stake the LP tokens received
Provide liquidity to {token_a_symbol}/{token_b_symbol} pool, then stake all LP tokens in the farming pool at {staking_contract}
Add {amount_a} {token_a_symbol} and {amount_b} {token_b_symbol} to PancakeSwap, approve and stake the LP tokens
Approve and Add Liquidity to PancakeSwap
Category: composite_problems / 
Difficulty: medium
Chain: BSC (mainnet)

A composite problem that tests the LLM's ability to:
1. Execute ERC20 approvals for both tokens to PancakeSwap Router
2. Execute add liquidity operation using the approvals
This demonstrates the DeFi approval pattern for liquidity provision.

Example requests:
Approve {token_a_symbol} and {token_b_symbol} for PancakeSwap, then add {amount_token_a} {token_a_symbol} and {amount_token_b} {token_b_symbol} as liquidity
First approve tokens, then add liquidity to the {token_a_symbol}/{token_b_symbol} pool
Approve LP Token and Remove Liquidity
Category: composite_problems / 
Difficulty: medium
Chain: BSC (mainnet)

A composite problem that tests the LLM's ability to:
1. Execute ERC20 approval for LP token to PancakeSwap Router
2. Execute remove liquidity operation using the approval
This demonstrates the DeFi approval pattern for liquidity withdrawal.

Example requests:
Approve PancakeSwap Router to spend your LP tokens, then remove liquidity from {token_a_symbol}/{token_b_symbol} pool
First approve LP tokens, then remove {liquidity_percentage}% of your liquidity from the {token_a_symbol}/{token_b_symbol} pool
Approve and Stake Tokens
Category: composite_problems / 
Difficulty: medium
Chain: BSC (mainnet)

A composite problem that tests the LLM's ability to:
1. Execute ERC20 approval for staking contract to spend CAKE tokens
2. Execute single token staking operation using the approval
This demonstrates the DeFi approval pattern for staking operations.
IMPORTANT: The SimpleStaking contract uses 'deposit(uint256 _amount)' function, NOT 'stake()'.

Example requests:
Approve the staking contract to spend {amount} CAKE, then stake {amount} CAKE tokens
First approve staking contract, then stake {amount} tokens in the pool
Approve, Swap, and Query Result
Category: composite_problems / complete_workflow
Difficulty: medium

Complete DeFi workflow: approve tokens, execute swap, and verify result.

This is a 3-step process:
1. Approve PancakeSwap Router to spend input tokens
2. Swap input tokens for output tokens using swapExactTokensForTokens
3. Query the output token balance to verify the swap result

Technical details:
- PancakeSwap Router: 0x10ED43C718714eb63d5aA57B78B54704E256024E
- approve(address spender, uint256 amount): 0x095ea7b3
- swapExactTokensForTokens: 0x38ed1739
- balanceOf(address): view function for query

Note: The key operation is the swap (step 2) since it's the core transaction.

Example requests:
Approve {amount_in} {token_in_symbol}, swap it for {token_out_symbol}, then check how much {token_out_symbol} you received
Approve PancakeSwap, swap {amount_in} {token_in_symbol} to {token_out_symbol}, and verify the output balance
First approve {amount_in} {token_in_symbol} for PancakeSwap Router, then swap for {token_out_symbol}, and finally query your {token_out_symbol} balance
Approve and Swap Tokens for BNB
Category: composite_problems / 
Difficulty: medium
Chain: BSC (mainnet)

A composite problem that tests the LLM's ability to:
1. Execute ERC20 approval for PancakeSwap Router
2. Execute swap operation to exchange tokens for BNB
This demonstrates the DeFi approval pattern for token-to-BNB swaps.

Example requests:
Approve PancakeSwap to spend {amount_in} {token_symbol}, then swap {amount_in} {token_symbol} for BNB
First approve the router, then swap {amount_in} {token_symbol} tokens to BNB on PancakeSwap
Approve and Swap Tokens on PancakeSwap
Category: composite_problems / 
Difficulty: medium
Chain: BSC (mainnet)

A composite problem that tests the LLM's ability to:
1. Execute an ERC20 approval for PancakeSwap Router
2. Execute a token-to-token swap using the approval
This demonstrates the DeFi approval pattern for token swaps.

Example requests:
Approve PancakeSwap to spend {amount_in} {token_in_symbol}, then swap {amount_in} {token_in_symbol} for {token_out_symbol}
First approve the router, then swap {amount_in} {token_in_symbol} to {token_out_symbol} on PancakeSwap
Approve and Execute TransferFrom
Category: composite_problems / 
Difficulty: medium
Chain: BSC (mainnet)

A composite problem that tests the LLM's ability to:
1. Execute an ERC20 approval (approve spender to spend tokens)
2. Execute a transferFrom operation using the approval
This demonstrates the ERC20 approval pattern where authorization is granted first, then used.

Example requests:
Approve {spender_address} to spend {amount} {token_symbol}, then transfer {amount} {token_symbol} from your account to {to_address} using transferFrom
First approve the spender, then execute transferFrom to move {amount} {token_symbol} tokens
Batch Approve Two Tokens and Add Liquidity
Category: composite_problems / batch_operations
Difficulty: medium

Batch approve two tokens and add liquidity.

This is a 3-step process:
1. Approve {token_a_symbol} for PancakeSwap Router
2. Approve {token_b_symbol} for PancakeSwap Router
3. Add liquidity with {amount_a} {token_a_symbol} and {amount_b} {token_b_symbol}

Token contracts:
- USDT: 0x55d398326f99059fF775485246999027B3197955
- BUSD: 0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56
- Router: 0x10ED43C718714eb63d5aA57B78B54704E256024E

Use addLiquidity(tokenA, tokenB, amountADesired, amountBDesired, amountAMin, amountBMin, to, deadline)
Function selector: 0xe8e33700

The key operation is adding liquidity (step 3).

IMPORTANT: Execute approvals first, then add liquidity.

Example requests:
Approve {token_a_symbol} and {token_b_symbol} for PancakeSwap, then add liquidity to the pool
Approve both tokens for the router, then add {amount_a} {token_a_symbol} and {amount_b} {token_b_symbol} as liquidity
Batch approve {token_a_symbol} and {token_b_symbol}, then provide {amount_a} and {amount_b} as liquidity
Batch Mixed Asset Transfers
Category: composite_problems / batch_operations
Difficulty: medium

Transfer multiple asset types to the same recipient.

This is a 3-step process:
1. Transfer {amount_bnb} BNB (native token)
2. Transfer {amount_usdt} USDT (ERC20)
3. Transfer {amount_busd} BUSD (ERC20)

All transfers go to the same address: {to_address}

Token contracts:
- USDT: 0x55d398326f99059fF775485246999027B3197955
- BUSD: 0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56

The key operation is the last transfer (BUSD, step 3).

IMPORTANT: Execute all 3 transfers in sequence.

Example requests:
Send {amount_bnb} BNB, {amount_usdt} USDT, and {amount_busd} BUSD to {to_address}
Transfer multiple assets to {to_address}: {amount_bnb} BNB, {amount_usdt} USDT, {amount_busd} BUSD
Pay {to_address} with {amount_bnb} BNB, {amount_usdt} USDT, and {amount_busd} BUSD
Batch Query Two Token Balances
Category: composite_problems / batch_query
Difficulty: easy

Query two different ERC20 token balances in sequence.

This is a 2-step query process:
1. Query USDT balance using balanceOf(address)
2. Query BUSD balance using balanceOf(address)

Technical details:
- USDT address: 0x55d398326f99059fF775485246999027B3197955
- BUSD address: 0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56
- Use balanceOf(address) view function
- No transaction required (read-only operations)

Note: This is a pure query operation for testing batch query functionality.

Example requests:
Check your USDT balance and BUSD balance
Query the balance of USDT at {usdt_address} and BUSD at {busd_address}
Get both your USDT and BUSD token balances
Batch Query Portfolio Balances
Category: composite_problems / query_workflows
Difficulty: easy

Query multiple asset balances to get portfolio summary.

This is a 3-step query process:
1. Query BNB balance using provider.getBalance(agentAddress)
2. Query USDT balance using balanceOf on USDT contract
3. Query CAKE balance using balanceOf on CAKE contract

IMPORTANT - Token contract addresses (use these EXACT addresses):
- USDT: 0x55d398326f99059fF775485246999027B3197955
- CAKE: 0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82

CRITICAL: BSC does NOT support ENS. Always use hex addresses directly.
Do NOT use token symbols like 'USDT' or 'CAKE' as addresses.

Example code pattern:
```
const usdtAddress = '0x55d398326f99059fF775485246999027B3197955';
const cakeAddress = '0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82';
const erc20Abi = ['function balanceOf(address) view returns (uint256)'];
const usdtContract = new ethers.Contract(usdtAddress, erc20Abi, provider);
const cakeContract = new ethers.Contract(cakeAddress, erc20Abi, provider);
const bnbBalance = await provider.getBalance(agentAddress);
const usdtBalance = await usdtContract.balanceOf(agentAddress);
const cakeBalance = await cakeContract.balanceOf(agentAddress);
```

This is a READ-ONLY operation. No transactions needed.
Return the query results as QUERY_RESULT type.

Example requests:
Check your portfolio: BNB balance, USDT balance, and CAKE balance
Query all your balances: BNB, USDT at {usdt_address}, and CAKE at {cake_address}
Get my portfolio summary: how much BNB, USDT, and CAKE do I have?
Batch Transfer BNB to 2 Addresses
Category: composite_problems / batch_transfer
Difficulty: easy

Execute two consecutive BNB transfers to different addresses.

This is a 2-step process:
1. Transfer BNB to the first address
2. Transfer BNB to the second address

Technical details:
- Simple native BNB transfers (no contract calls)
- Each transfer is a separate transaction
- Agent must have sufficient BNB for both transfers plus gas

Note: The key operation is the second transfer since it completes the batch.

Example requests:
Transfer {amount1} BNB to {address1} and {amount2} BNB to {address2}
Send {amount1} BNB to {address1}, then send {amount2} BNB to {address2}
Make two BNB transfers: {amount1} BNB to {address1} and {amount2} BNB to {address2}
Batch Transfer ERC20 Tokens to 2 Addresses
Category: composite_problems / batch_transfer
Difficulty: medium

Execute two consecutive ERC20 token transfers to different addresses.

This is a 2-step process:
1. Transfer tokens to the first address using transfer(address, uint256)
2. Transfer tokens to the second address using transfer(address, uint256)

Technical details:
- ERC20 transfer function: transfer(address to, uint256 amount)
- Function selector: 0xa9059cbb
- Each transfer is a separate transaction
- Agent must have sufficient token balance for both transfers

Note: The key operation is the second transfer since it completes the batch.

Example requests:
Transfer {amount1} {token_symbol} to {address1} and {amount2} {token_symbol} to {address2}
Send {amount1} {token_symbol} tokens to {address1}, then send {amount2} {token_symbol} tokens to {address2}
Make two {token_symbol} transfers: {amount1} to {address1} and {amount2} to {address2}
Batch Transfer BNB to 3 Addresses
Category: composite_problems / batch_operations
Difficulty: easy

Batch BNB distribution to 3 different addresses.

This is a 3-step process:
1. Transfer {amount1} BNB to address1
2. Transfer {amount2} BNB to address2
3. Transfer {amount3} BNB to address3

Each transfer is a simple BNB transfer (native token).
The key operation is the last transfer (step 3).

IMPORTANT: Execute all 3 transfers in sequence.

Example requests:
Transfer {amount1} BNB to {address1}, {amount2} BNB to {address2}, and {amount3} BNB to {address3}
Send BNB to three addresses: {amount1} to {address1}, {amount2} to {address2}, {amount3} to {address3}
Distribute BNB: send {amount1} BNB to {address1}, {amount2} BNB to {address2}, and {amount3} BNB to {address3}
Batch Transfer ERC20 Tokens to 3 Addresses
Category: composite_problems / batch_operations
Difficulty: medium

Batch ERC20 token distribution to 3 different addresses.

This is a 3-step process:
1. Transfer {amount1} {token_symbol} to address1
2. Transfer {amount2} {token_symbol} to address2
3. Transfer {amount3} {token_symbol} to address3

Each transfer uses the ERC20 transfer(address,uint256) function.
Token contract: USDT (0x55d398326f99059fF775485246999027B3197955)
Function selector: 0xa9059cbb

The key operation is the last transfer (step 3).

IMPORTANT: Execute all 3 transfers in sequence.

Example requests:
Transfer {amount1} {token_symbol} to {address1}, {amount2} to {address2}, and {amount3} to {address3}
Distribute {token_symbol} tokens: send {amount1} to {address1}, {amount2} to {address2}, {amount3} to {address3}
Send {token_symbol} to three addresses: {amount1} to {address1}, {amount2} to {address2}, {amount3} to {address3}
Complete DeFi Workflow: Swap and Stake
Category: composite_problems / complex_defi_workflows
Difficulty: hard

Complete a full DeFi workflow: swap tokens and stake the result.

This is a 6-step flagship workflow:
1. Query your USDT balance to verify you have enough
2. Approve USDT for PancakeSwap Router
3. Swap {amount_usdt} USDT for CAKE
4. Approve CAKE for the staking pool
5. Stake all received CAKE
6. Query staked amount to verify

Contract addresses:
- USDT: {usdt_address}
- CAKE: {cake_address}
- PancakeSwap Router V2: {router_address}
- Staking Pool: {pool_address}

The KEY OPERATION is step 5 (stake_single_token).

Functions:
- ERC20 approve(address spender, uint256 amount): 0x095ea7b3
- Router swapExactTokensForTokens(amountIn, amountOutMin, path, to, deadline): 0x38ed1739
- Staking deposit(uint256 amount): 0xb6b55f25

Path for swap: [USDT, WBNB, CAKE]
- WBNB: 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c

IMPORTANT:
- Use high slippage (50%) for swap due to price impact
- Stake ALL received CAKE (query balance after swap)
- Deadline should be current timestamp + 1200 seconds

Example requests:
Check your USDT balance, swap {amount_usdt} USDT for CAKE on PancakeSwap, then stake all received CAKE in the staking pool and verify the staked amount
Complete DeFi workflow: query USDT balance, swap {amount_usdt} USDT to CAKE, stake all CAKE, and confirm the stake
Execute full DeFi workflow: verify USDT, swap {amount_usdt} USDT for CAKE, approve staking, stake CAKE, confirm stake
Emergency Exit: Withdraw, Remove Liquidity, Convert to BNB
Category: composite_problems / advanced_defi
Difficulty: hard

Emergency exit workflow to convert DeFi positions back to native BNB.

This is a 5-step process:
1. Emergency withdraw all staked LP tokens from SimpleRewardPool
2. Approve LP tokens to PancakeSwap Router
3. Remove liquidity to get WBNB and USDT
4. Unwrap WBNB to native BNB
5. Query final BNB balance to verify

Technical details:
- SimpleRewardPool: deployed dynamically (emergencyWithdraw())
- PancakeSwap Router: 0x10ED43C718714eb63d5aA57B78B54704E256024E
- WBNB: 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c
- USDT: 0x55d398326f99059fF775485246999027B3197955
- WBNB/USDT LP: 0x16b9a82891338f9bA80E2D6970FddA79D1eb0daE

Functions:
- emergencyWithdraw(): Withdraw all staked tokens without rewards
- removeLiquidityETH(token, liquidity, ...): Remove liquidity
- withdraw(uint256): WBNB unwrap

Note: Emergency withdraw forfeits pending rewards but guarantees LP recovery.
BSC does NOT support ENS. Use hex addresses directly.

Example requests:
Emergency exit: withdraw all staked LP tokens, remove liquidity, unwrap WBNB to BNB, and verify balance
Panic sell: emergency withdraw from pool at {pool_address}, remove all liquidity, convert to BNB
Exit DeFi position: emergency withdraw LP from {pool_address}, remove WBNB/USDT liquidity, unwrap WBNB, verify BNB
Full Liquidity Cycle: Add, Stake, Harvest, Unstake, Remove
Category: composite_problems / complex_defi
Difficulty: hard

Complete liquidity provider lifecycle from start to finish.

This is a 5-step process:
1. Add liquidity with BNB and USDT to get WBNB/USDT LP tokens
2. Stake LP tokens in SimpleRewardPool
3. Harvest pending CAKE rewards
4. Unstake LP tokens from the pool
5. Remove liquidity to get back BNB and USDT

Technical details:
- PancakeSwap Router: 0x10ED43C718714eb63d5aA57B78B54704E256024E
- WBNB: 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c
- USDT: 0x55d398326f99059fF775485246999027B3197955
- WBNB/USDT LP: 0x16b9a82891338f9bA80E2D6970FddA79D1eb0daE
- SimpleRewardPool: deployed dynamically
- Reward Token: CAKE (0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82)

Functions:
- addLiquidityETH: Add BNB + token liquidity
- stake(uint256): Stake LP tokens
- harvest(): Claim pending rewards
- withdraw(uint256): Unstake LP tokens
- removeLiquidityETH: Remove liquidity to BNB + token

Note: This uses WBNB/USDT LP which is compatible with SimpleRewardPool for testing.

Example requests:
Add liquidity with {amount_bnb} BNB and {amount_token} {token_symbol}, stake LP, harvest rewards, then unstake and remove liquidity
Complete liquidity cycle: provide liquidity, stake, harvest, unstake, and withdraw
Full DeFi workflow: add {amount_bnb} BNB + {amount_token} {token_symbol} liquidity, stake LP at {reward_pool_address}, harvest CAKE rewards, unstake LP, remove liquidity
Harvest Rewards, Sell Partial, and Re-stake
Category: composite_problems / complex_defi
Difficulty: hard

Complex DeFi workflow: harvest rewards, take profit, and compound remaining.

This is a 5-step process:
1. Harvest pending CAKE rewards from SimpleRewardPool using harvest()
2. Approve CAKE tokens to PancakeSwap Router for swapping
3. Swap {swap_amount} CAKE for USDT using swapExactTokensForTokens
4. Approve remaining CAKE tokens to SimpleStaking contract
5. Re-stake remaining CAKE tokens using deposit(uint256)

Technical details:
- SimpleRewardPool contract: deployed dynamically (harvest())
- SimpleStaking contract: deployed dynamically (deposit(uint256))
- PancakeSwap Router: 0x10ED43C718714eb63d5aA57B78B54704E256024E
- CAKE Token: 0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82
- USDT Token: 0x55d398326f99059fF775485246999027B3197955
- WBNB (for path): 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c

IMPORTANT:
- harvest() returns CAKE rewards to the agent
- The swap path is: CAKE -> WBNB -> USDT
- After swap, approve remaining CAKE to staking contract, NOT router
- SimpleStaking uses deposit(uint256) function

BSC does NOT support ENS. Use hex addresses directly.

Example requests:
Harvest rewards from the pool, swap {swap_amount} CAKE for USDT, then re-stake the remaining CAKE
Collect farming rewards, sell {swap_amount} CAKE for USDT on PancakeSwap, and re-stake the rest
Claim CAKE rewards from {reward_pool_address}, swap {swap_amount} CAKE to USDT, then stake remaining CAKE at {staking_contract}
Liquidity Provision with LP Staking
Category: composite_problems / complex_defi_workflows
Difficulty: hard

Complete liquidity provision workflow: add liquidity and stake LP tokens.

This is a 6-step workflow:
1. Approve {token_a_symbol} for PancakeSwap Router
2. Approve {token_b_symbol} for PancakeSwap Router
3. Add liquidity with {amount_token_a} {token_a_symbol} + {amount_token_b} {token_b_symbol}
4. Approve received LP tokens for staking pool
5. Stake all LP tokens
6. Query staked amount to verify

Contract addresses:
- Token A ({token_a_symbol}): {token_a_address}
- Token B ({token_b_symbol}): {token_b_address}
- PancakeSwap Router V2: {router_address}
- LP Staking Pool: {pool_address}

The KEY OPERATION is step 5 (stake_lp_tokens).

Functions:
- ERC20 approve(address spender, uint256 amount): 0x095ea7b3
- Router addLiquidity(tokenA, tokenB, amountADesired, amountBDesired, amountAMin, amountBMin, to, deadline): 0xe8e33700
- Staking deposit(uint256 amount): 0xb6b55f25

LP Token: Query from PancakeSwap Factory using getPair(tokenA, tokenB)
Factory: 0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73

IMPORTANT:
- Use high slippage (50%) for liquidity provision
- Stake ALL received LP tokens
- The LP token address can be obtained from Factory.getPair()

Example requests:
Approve {token_a_symbol} and {token_b_symbol}, add liquidity to get LP tokens, then stake the LP tokens and verify
Provide liquidity to {token_a_symbol}/{token_b_symbol} pool with {amount_token_a} and {amount_token_b}, then stake all LP tokens
Add {amount_token_a} {token_a_symbol} + {amount_token_b} {token_b_symbol} as liquidity, approve and stake all received LP tokens
Multi-Approve Multi-Swap: USDT → CAKE → BUSD
Category: composite_problems / complex_defi
Difficulty: hard

Complex multi-swap workflow with multiple approvals.

This is a 5-step process:
1. Approve USDT to PancakeSwap Router
2. Swap USDT for CAKE using swapExactTokensForTokens
3. Approve CAKE to PancakeSwap Router
4. Swap all received CAKE for BUSD
5. Query final BUSD balance to verify

Technical details:
- PancakeSwap Router: 0x10ED43C718714eb63d5aA57B78B54704E256024E
- USDT: 0x55d398326f99059fF775485246999027B3197955
- CAKE: 0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82
- BUSD: 0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56
- WBNB (for path): 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c

Swap paths:
- USDT → WBNB → CAKE
- CAKE → WBNB → BUSD

BSC does NOT support ENS. Use hex addresses directly.

Example requests:
Swap {amount} USDT for CAKE, then swap all CAKE for BUSD on PancakeSwap, and verify the final BUSD balance
Multi-hop swap: USDT → CAKE → BUSD through PancakeSwap
Approve {amount} USDT, swap to CAKE, approve CAKE, swap to BUSD, then query BUSD balance
Multi-Step Token Swap (BNB → USDT → BUSD)
Category: composite_problems / defi_workflows
Difficulty: medium

Execute a multi-step token swap through PancakeSwap.

This is a 3-step process:
1. Swap {amount_bnb} BNB for USDT using swapExactETHForTokens
2. Approve PancakeSwap Router to spend USDT
3. Swap all received USDT for BUSD using swapExactTokensForTokens

Contract addresses:
- PancakeSwap Router: 0x10ED43C718714eb63d5aA57B78B54704E256024E
- WBNB: 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c
- USDT: 0x55d398326f99059fF775485246999027B3197955
- BUSD: 0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56

Function signatures:
- swapExactETHForTokens: 0x7ff36ab5
- swapExactTokensForTokens: 0x38ed1739
- approve: 0x095ea7b3

Swap paths:
- Step 1: [WBNB, USDT]
- Step 3: [USDT, BUSD]

The key operation is the final swap (USDT → BUSD, step 3).

IMPORTANT: Use 5% slippage tolerance for all swaps.

Example requests:
Swap {amount_bnb} BNB for USDT, then swap all USDT for BUSD on PancakeSwap
Exchange {amount_bnb} BNB to USDT, then convert all USDT to BUSD
Convert {amount_bnb} BNB to USDT first, approve router, then swap USDT for BUSD
NFT Bundle Sale: Transfer Two NFTs and Receive Payment
Category: composite_problems / advanced_nft
Difficulty: hard

NFT bundle sale workflow with payment and verification.

This is a 5-step process:
1. Transfer NFT #1 to buyer
2. Transfer NFT #2 to buyer
3. Receive ERC20 payment from buyer (simulated as transfer to self)
4. Verify NFT #1 new owner
5. Verify NFT #2 new owner

Technical details:
- ERC721 Test NFT: deployed dynamically
- USDT: 0x55d398326f99059fF775485246999027B3197955
- transferFrom(from, to, tokenId): Transfer NFT
- ownerOf(tokenId): Query NFT owner

Note: In real scenarios, payment would come from buyer. For testing,
we simulate receiving payment as a transfer operation.
BSC does NOT support ENS. Use hex addresses directly.

Example requests:
Bundle sale: transfer NFT #{token_id1} and NFT #{token_id2} to {buyer_address}, receive {payment} {token_symbol}, and verify transfers
Sell NFT bundle: transfer two NFTs to {buyer_address} for {payment} {token_symbol} payment
Complete NFT bundle sale: send NFT #{token_id1} and #{token_id2} from {nft_address} to buyer, get {payment} USDT, verify ownership
NFT Transfer with Token Payment
Category: composite_problems / nft_workflows
Difficulty: medium

Execute an NFT sale: transfer NFT to buyer and collect payment.

This is a 3-step process:
1. Transfer NFT #{token_id} to the buyer address
2. Transfer {payment} {token_symbol} tokens (simulated payment receipt)
3. Query NFT owner to verify the transfer succeeded

NFT Contract (ERC721 Test NFT): Use the deployed test NFT contract
Payment Token: USDT (0x55d398326f99059fF775485246999027B3197955)

ERC721 transfer function:
- transferFrom(address from, address to, uint256 tokenId)
- Function selector: 0x23b872dd

IMPORTANT:
- You own NFT #{token_id} initially
- Transfer the NFT to {buyer_address}
- The payment is a simulated receipt (you send tokens to yourself)

The key operation is the NFT transfer (step 1).

Example requests:
Transfer NFT token {token_id} to {buyer_address} and receive {payment} {token_symbol} as payment, then verify the transfer
Sell NFT #{token_id} from {nft_address} to {buyer_address} for {payment} {token_symbol}
Send NFT #{token_id} to {buyer_address}, collect {payment} {token_symbol} payment, and confirm ownership changed
Optimized Swap with Query: Check Reserves, Calculate, Execute, Verify
Category: composite_problems / advanced_defi
Difficulty: hard

Advanced DeFi workflow with pre-swap analysis and post-swap verification.

This is a 5-step process:
1. Query pair reserves to check liquidity
2. Calculate expected swap output amount
3. Approve input token to Router
4. Execute the swap with calculated parameters
5. Query output token balance to verify

Technical details:
- PancakeSwap Router: 0x10ED43C718714eb63d5aA57B78B54704E256024E
- PancakeSwap Factory: 0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73
- USDT: 0x55d398326f99059fF775485246999027B3197955
- BUSD: 0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56
- USDT/BUSD Pair: 0x7EFaEf62fDdCCa950418312c6C91Aef321375A00

Query functions:
- getReserves(): returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast)
- getAmountsOut(uint amountIn, address[] path): returns expected output

BSC does NOT support ENS. Use hex addresses directly.

Example requests:
Query pair reserves, calculate optimal swap amount for {amount} {token_in_symbol}, execute the swap, then verify output
Optimize swap: check reserves, calculate expected output, swap {amount} {token_in_symbol} to {token_out_symbol}, and confirm
Advanced swap workflow: query {pair_address} reserves, estimate output for {amount} {token_in_symbol}, approve and swap to {token_out_symbol}, verify balance
Portfolio Rebalance: Query Holdings and Convert to BUSD
Category: composite_problems / advanced_defi
Difficulty: hard

Advanced portfolio management workflow with multiple swaps.

This is a 5-step process:
1. Query USDT balance to check holdings
2. Query CAKE balance to check holdings
3. Swap portion of USDT to BUSD
4. Swap portion of CAKE to BUSD (KEY OPERATION)
5. Query final BUSD balance to verify rebalancing

Technical details:
- PancakeSwap Router: 0x10ED43C718714eb63d5aA57B78B54704E256024E
- USDT: 0x55d398326f99059fF775485246999027B3197955
- CAKE: 0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82
- BUSD: 0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56
- WBNB (for path): 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c

Swap paths:
- USDT → BUSD (direct pair exists)
- CAKE → WBNB → BUSD

Note: Both USDT and CAKE must be approved to Router before swaps.
BSC does NOT support ENS. Use hex addresses directly.

Example requests:
Rebalance portfolio: check USDT and CAKE balances, swap {amount_usdt} USDT and {amount_cake} CAKE to BUSD, then verify
Query current holdings, convert {amount_usdt} USDT and {amount_cake} CAKE to BUSD
Portfolio management: query USDT at {usdt_address} and CAKE at {cake_address}, swap portions to BUSD, verify final balance
Category: composite_problems / 
Difficulty: medium


Example requests:
Check the allowance for {{spender_address}}, approve {{amount}} {{token_symbol}}, then verify the allowance increased
Query current allowance, approve {{spender_address}} to spend {{amount}} {{token_symbol}}, and confirm the approval
First check how much {{token_symbol}} {{spender_address}} can spend, then approve {{amount}} {{token_symbol}}, and verify the approval succeeded
Query the allowance for {{spender_address}} on {{token_symbol}}, approve {{amount}} {{token_symbol}}, then verify the new allowance
Query BNB Balance, Wrap BNB to WBNB, and Verify
Category: composite_problems / 
Difficulty: medium
Chain: BSC (mainnet)

A composite problem that tests the LLM's ability to:
1. Query initial BNB balance
2. Execute a WBNB deposit (wrap BNB to WBNB)
3. Query final WBNB balance to verify the wrap

Example requests:
Check your BNB balance, wrap {amount} BNB to WBNB, then verify your WBNB balance
Query BNB balance, deposit {amount} BNB to WBNB contract, and confirm WBNB received
Category: composite_problems / 
Difficulty: easy


Example requests:
Check your BNB balance, transfer {{amount}} BNB to {{to_address}}, then verify your remaining balance
Query your BNB balance, send {{amount}} BNB to {{to_address}}, and confirm the transfer succeeded
First check how much BNB you have, then send {{amount}} BNB to {{to_address}}, and verify the transaction
Query your current BNB balance, transfer {{amount}} BNB to {{to_address}}, then check your balance again to verify
Query-Transfer-Verify ERC20 Workflow
Category: composite_problems / basic_workflows
Difficulty: medium
Chain: BSC (mainnet)

A composite problem that tests the LLM's ability to:
1. Query initial ERC20 token balance
2. Execute a token transfer
3. Query final balance to verify the transfer

Scoring is based DIRECTLY on the atomic validator of step 2 (erc20_transfer_fixed).
This eliminates code duplication and ensures consistency with atomic problem scoring.

Example requests:
Check your {token_symbol} balance, transfer {amount} {token_symbol} to {to_address}, then verify your new balance
Query your {token_symbol} balance, send {amount} tokens to {to_address}, and confirm the balance decreased correctly
First check how much {token_symbol} you have, then transfer {amount} {token_symbol} to {to_address}, and finally verify the transfer succeeded
Query balance of {token_symbol}, transfer {amount} to {to_address}, and check your remaining balance
Query NFT Owner, Transfer NFT, and Verify
Category: composite_problems / 
Difficulty: medium
Chain: BSC (mainnet)

A composite problem that tests the LLM's ability to:
1. Query initial NFT token owner
2. Execute an ERC721 NFT transfer
3. Query final NFT token owner to verify the transfer

Example requests:
Check the owner of NFT token {token_id}, transfer it to {to_address}, then verify the new owner
Query who owns NFT #{token_id} from {nft_address}, transfer it to {to_address}, and confirm ownership changed
Query Reserves, Swap BNB for Tokens, and Verify Reserves Changed
Category: composite_problems / 
Difficulty: medium
Chain: BSC (mainnet)

A composite problem that tests the LLM's ability to:
1. Query initial liquidity pair reserves
2. Execute a BNB to token swap on PancakeSwap
3. Query final liquidity pair reserves to verify the swap affected reserves

Example requests:
Check the reserves of {token_symbol}/BNB pair, swap {amount} BNB for {token_symbol}, then verify reserves changed
Query pair reserves at {pair_address}, execute swap, and confirm the reserves updated correctly
Query Pending Rewards, Harvest Rewards, and Verify
Category: composite_problems / 
Difficulty: medium
Chain: BSC (mainnet)

A composite problem that tests the LLM's ability to:
1. Query pending rewards in the staking pool
2. Execute a harvest rewards operation
3. Query final reward token balance to verify the harvest

Example requests:
Check your pending rewards in the pool, harvest them, then verify the reward tokens in your wallet
Query pending rewards at {pool_address}, harvest all rewards, and confirm tokens received
Query Staked Amount, Stake Token, and Verify
Category: composite_problems / 
Difficulty: medium
Chain: BSC (mainnet)

A composite problem that tests the LLM's ability to:
1. Query initial staked amount in the pool
2. Execute a token staking operation
3. Query final staked amount to verify the stake

Example requests:
Check your staked amount, stake {amount} CAKE tokens, then verify the new staked amount
Query your staked balance in the pool, stake {amount} tokens, and confirm the stake increased
Query Expected Output, Swap BNB, and Verify Result
Category: composite_problems / complete_workflow
Difficulty: medium

Complete swap verification workflow: query expected output, execute swap, and verify.

This is a 3-step process:
1. Query expected swap output using PancakeSwap Router's getAmountsOut()
2. Execute the swap using swapExactETHForTokens()
3. Query token balance to verify the received amount

Technical details:
- PancakeSwap Router: 0x10ED43C718714eb63d5aA57B78B54704E256024E
- getAmountsOut(uint amountIn, address[] path): view function
- swapExactETHForTokens: 0x7ff36ab5 (sends BNB, receives tokens)
- Token out: USDT (0x55d398326f99059fF775485246999027B3197955)
- Path: [WBNB, Token_Out]

Note: The key operation is the swap since it's the core transaction.

Example requests:
Calculate expected output for {amount_bnb} BNB swap to {token_out_symbol}, execute the swap, then verify you got the expected amount
Query expected swap output using getAmountsOut, swap {amount_bnb} BNB for {token_out_symbol}, and confirm the output matches
First check how much {token_out_symbol} you would get for {amount_bnb} BNB, then swap, and verify the received amount
Remove Liquidity and Unwrap to BNB
Category: composite_problems / liquidity_workflows
Difficulty: medium

Remove liquidity from a BNB/Token pool and convert WBNB back to BNB.

This is a 3-step process:
1. Remove {liquidity_percentage}% liquidity from BNB/{token_symbol} pool (receive WBNB + {token_symbol})
2. Unwrap the received WBNB to BNB
3. Query your BNB balance to verify the withdrawal

Contract addresses:
- WBNB: {wbnb_address}
- Token ({token_symbol}): {token_address}
- PancakeSwap Router V2: {router_address}

IMPORTANT: The key operation is step 1 (removeLiquidityETH).

Functions:
- Router removeLiquidityETH(token, liquidity, amountTokenMin, amountETHMin, to, deadline): 0x02751cec
  Returns BNB directly, no need to unwrap!
- WBNB withdraw(uint256 wad): 0x2e1a7d4d (if using removeLiquidity instead)

Note: Your LP tokens are already approved for the Router.
LP Token Address: Get from PancakeSwap Factory by calling getPair(WBNB, Token)

Example requests:
Remove liquidity from BNB/{token_symbol} pool, unwrap the WBNB to BNB, then check your BNB balance
Withdraw liquidity to get WBNB and {token_symbol}, then convert WBNB back to BNB
Remove {liquidity_percentage}% of your LP tokens from BNB/{token_symbol} pool, unwrap received WBNB, and verify BNB balance
Split and Transfer Token Balance
Category: composite_problems / distribution_workflows
Difficulty: medium

Split your entire token balance between two recipients.

This is a 3-step process:
1. Transfer 50% of your {token_symbol} balance to {address1}
2. Transfer the remaining 50% (all remaining) to {address2}
3. Query your balance to verify it is zero (or near zero)

Token: {token_symbol} at {token_address}
Token decimals: 18

IMPORTANT:
- First calculate your current balance
- Transfer exactly 50% to address1
- Transfer remaining balance (100% of what's left) to address2
- The key operation is the second transfer (step 2)

ERC20 transfer function:
- transfer(address to, uint256 amount)
- Function selector: 0xa9059cbb

Example: If you have 100 tokens:
- Step 1: Transfer 50 tokens to address1
- Step 2: Transfer 50 tokens to address2
- Result: Your balance should be 0

Example requests:
Split your {token_symbol} balance: send 50% to {address1} and 50% to {address2}, then verify you transferred all
Distribute your {token_symbol} equally between {address1} and {address2}
Transfer half of your {token_symbol} to {address1}, the other half to {address2}, and verify balance is zero
Swap BNB for CAKE, Approve, and Stake
Category: composite_problems / complete_workflow
Difficulty: medium

Complete DeFi workflow: swap BNB for tokens, approve, and stake.

This is a 3-step process:
1. Swap BNB for CAKE using PancakeSwap swapExactETHForTokens
2. Approve the staking contract to spend CAKE
3. Stake the received CAKE tokens

Technical details:
- PancakeSwap Router: 0x10ED43C718714eb63d5aA57B78B54704E256024E
- CAKE Token: 0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82
- swapExactETHForTokens: 0x7ff36ab5 (sends BNB, receives tokens)
- approve(address spender, uint256 amount): 0x095ea7b3
- Staking function: deposit(uint256 amount)

IMPORTANT: The staking contract uses deposit(uint256) function, NOT stake().
The key operation is the stake (step 3) since it's the final goal.

Example requests:
Swap {amount_bnb} BNB for CAKE, approve the staking contract, then stake all received CAKE
Exchange {amount_bnb} BNB for CAKE on PancakeSwap, then stake all CAKE in the pool
Use {amount_bnb} BNB to buy CAKE, approve staking contract at {staking_contract}, and stake the CAKE
Swap Token to WBNB and Unwrap to BNB
Category: composite_problems / swap_unwrap
Difficulty: medium

Swap ERC20 tokens for WBNB and then unwrap the WBNB to get native BNB.

This is a 2-step process:
1. Swap tokens for WBNB using swapExactTokensForTokens (Token needs to be approved first)
2. Withdraw WBNB to get native BNB using withdraw(uint256)

Technical details:
- WBNB contract address: 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c
- PancakeSwap Router: 0x10ED43C718714eb63d5aA57B78B54704E256024E
- swapExactTokensForTokens: 0x38ed1739
- WBNB withdraw(uint256): 0x2e1a7d4d

Note: The key operation is wbnb_withdraw since the final goal is to get native BNB.

Example requests:
Swap {amount_in} {token_in_symbol} for WBNB on PancakeSwap, then unwrap all WBNB to BNB
Exchange {amount_in} {token_in_symbol} tokens for WBNB, then withdraw WBNB to get BNB
Convert {amount_in} {token_in_symbol} to WBNB using PancakeSwap, then unwrap to native BNB
Triple Pool: BNB to Stablecoin Liquidity
Category: composite_problems / advanced_defi
Difficulty: hard

Complex DeFi workflow to convert BNB to stablecoin liquidity position.

This is a 6-step process:
1. Swap BNB for USDT on PancakeSwap
2. Approve USDT for swapping
3. Swap half USDT for BUSD
4. Approve remaining USDT for liquidity
5. Approve BUSD for liquidity
6. Add liquidity to USDT/BUSD pool

Technical details:
- PancakeSwap Router: 0x10ED43C718714eb63d5aA57B78B54704E256024E
- WBNB: 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c
- USDT: 0x55d398326f99059fF775485246999027B3197955
- BUSD: 0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56
- USDT/BUSD LP: 0x7EFaEf62fDdCCa950418312c6C91Aef321375A00

Functions:
- swapExactETHForTokens: BNB → USDT
- swapExactTokensForTokens: USDT → BUSD
- addLiquidity: Add USDT + BUSD to pool

Note: Approvals required for both swap and liquidity operations.
BSC does NOT support ENS. Use hex addresses directly.

Example requests:
Swap {amount} BNB to USDT, then swap half to BUSD, and add liquidity to USDT/BUSD pool
Convert BNB to USDT and BUSD, then provide liquidity to the stablecoin pool
Multi-step liquidity: BNB → USDT → BUSD, then add USDT/BUSD liquidity on PancakeSwap
Unstake LP Tokens, Harvest Rewards, and Query Balance
Category: composite_problems / complete_workflow
Difficulty: medium

Complete staking exit workflow: unstake LP tokens, harvest rewards, and verify.

This is a 3-step process:
1. Unstake LP tokens from the reward pool using withdraw(uint256)
2. Harvest pending CAKE rewards using harvest()
3. Query CAKE balance to verify rewards received

Technical details:
- SimpleRewardPool contract: deployed dynamically
- LP Token: USDT/BUSD LP (0x7EFaEf62fDdCCa950418312c6C91Aef321375A00)
- Reward Token: CAKE (0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82)
- withdraw(uint256 _amount): unstake LP tokens
- harvest(): claim pending rewards

Note: The key operation is harvest_rewards since it's the main goal.

Example requests:
Unstake {unstake_amount} LP tokens, harvest rewards, then check your reward token balance
Withdraw {unstake_amount} LP tokens from the pool, harvest all rewards, and verify rewards received
Remove {unstake_amount} LP tokens from staking at {pool_address}, harvest pending CAKE rewards, then query your CAKE balance
Wrap BNB and Add Liquidity
Category: composite_problems / liquidity_workflows
Difficulty: medium

Wrap BNB to WBNB and add liquidity to a token pair on PancakeSwap.

This is a 3-step process:
1. Deposit {amount_bnb} BNB to WBNB contract to get WBNB
2. Approve WBNB for PancakeSwap Router
3. Add liquidity with {amount_wbnb} WBNB and {amount_token_b} {token_b_symbol}

Contract addresses:
- WBNB: {wbnb_address}
- Token B ({token_b_symbol}): {token_b_address}
- PancakeSwap Router V2: {router_address}

Functions:
- WBNB deposit(): Payable function, send BNB to get WBNB
- ERC20 approve(address spender, uint256 amount): 0x095ea7b3
- Router addLiquidity(tokenA, tokenB, amountADesired, amountBDesired, amountAMin, amountBMin, to, deadline): 0xe8e33700

The key operation is step 3 (addLiquidity).

Note: You already have {token_b_symbol} allowance set for Router.

Example requests:
Wrap {amount_bnb} BNB to WBNB, then add liquidity to WBNB/{token_b_symbol} pool with {amount_wbnb} WBNB and {amount_token_b} {token_b_symbol}
Deposit BNB to WBNB, approve it, and provide liquidity to the WBNB/{token_b_symbol} pool
Convert {amount_bnb} BNB to WBNB, approve PancakeSwap Router, then add {amount_wbnb} WBNB + {amount_token_b} {token_b_symbol} as liquidity
Wrap BNB and Swap WBNB for Token
Category: composite_problems / wrap_swap
Difficulty: medium

Wrap native BNB into WBNB and swap the WBNB for another token.

This is a 3-step process:
1. Deposit BNB to WBNB contract using deposit() function
2. Approve PancakeSwap Router to spend the WBNB
3. Swap WBNB for the target token using swapExactTokensForTokens

Technical details:
- WBNB contract address: 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c
- WBNB deposit() function: 0xd0e30db0 (payable)
- PancakeSwap Router: 0x10ED43C718714eb63d5aA57B78B54704E256024E
- swapExactTokensForTokens: 0x38ed1739

Example requests:
Wrap {amount} BNB to WBNB, then swap the WBNB for {token_out_symbol} on PancakeSwap
Deposit {amount} BNB to WBNB, approve and swap for {token_out_symbol}
Convert {amount} BNB to WBNB and swap it for {token_out_symbol} using PancakeSwap Router
Wrap BNB and Unwrap Back to BNB (Cycle Test)
Category: composite_problems / wrap_unwrap
Difficulty: easy

Test the WBNB wrap/unwrap functionality by wrapping BNB and immediately unwrapping it.

This is a 2-step process:
1. Deposit BNB to WBNB contract using deposit() function
2. Withdraw WBNB back to BNB using withdraw(uint256) function

Technical details:
- WBNB contract address: 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c
- deposit() function: 0xd0e30db0 (payable)
- withdraw(uint256) function: 0x2e1a7d4d

Note: This is a test case to verify wrap/unwrap functionality works correctly.
The key operation is wbnb_withdraw since the final goal is to get BNB back.

Example requests:
Wrap {amount} BNB to WBNB, then immediately unwrap all WBNB back to BNB
Deposit {amount} BNB to WBNB and withdraw it back to BNB
Convert {amount} BNB to WBNB, then convert it back to native BNB