# CurveBurner: missing slippage protection enables sandwich drain

CurveBurner's execute() added only USDT liquidity to Curve 3pool without slippage protection, letting an attacker sandwich it to drain ~$36K.

- Payout: Real-world hack
- Severity: high
- Program: CurveBurner
- Analysis by: DeFiHackLabs
- Disclosed: 2023-08-02
- Write-up quality: 7/10
- Original: https://github.com/SunWeb3Sec/DeFiHackLabs/blob/main/src/test/2023-08/CurveBurner_exp.sol
- Library page: https://bugbountylibrary.com/r/dhl%3A20230802-curveburner
- Tags: area:web3 domain:web3 impact:funds-loss kind:incident platform:defihacklabs sev:high tech:evm tech:solidity vuln:business-logic

**Target:** CurveBurner contract (0x786b...) interacting with Curve 3pool
**Root cause:** CurveBurner.execute() calls Curve 3pool add_liquidity with only USDT and min_mint_amount=1, providing no slippage protection on the resulting LP mint or the implicit swap.
**Steps:**
1. Flash loan 35,986 wstETH, 79,768 WETH, 10,744,911 USDT from Balancer.
2. Deposit wstETH to Aave v3 and borrow 40M USDT; deposit WETH to Aave v2 and borrow 65M USDT; mint cETH with 29K ETH and borrow 40M USDT from cUSDT.
3. Approve tokens to Curve 3pool, cUSDT, Aave v2/v3.
4. `Curve3POOL.add_liquidity([0,0,USDT.balanceOf(this)], 1)` to deposit USDT.
5. `Curve3POOL.remove_liquidity_imbalance([DAI*978/1000, USDC*978/1000, 0], LP.balanceOf(this))` to withdraw most DAI and USDC, skewing the pool.
6. Call `CurveBurner.execute()` which adds only USDT liquidity with min_mint_amount=1, swapping USDT to DAI/USDC at a manipulated rate.
7. `Curve3POOL.add_liquidity([DAI.balanceOf(this), USDC.balanceOf(this), 0], 1)` to rebalance.
8. `Curve3POOL.remove_liquidity_one_coin(LP.balanceOf(this), 2, 1)` to withdraw USDT.
9. Repay cUSDT, redeem cETH, repay Aave v2/v3, withdraw collateral, repay Balancer flash loan.
**How found:** Likely identified that CurveBurner.execute() calls add_liquidity with min_mint_amount=1 and no other slippage guard, making it sandwichable.
**Exploitation:** Attacker flash-borrowed large amounts, borrowed more via Aave v2/v3 and Compound, then skewed Curve 3pool by adding USDT and removing DAI/USDC. CurveBurner.execute() then added USDT liquidity at the skewed price with no slippage limit, effectively buying DAI/USDC cheaply. Attacker rebalanced and withdrew USDT, repaying all loans and keeping ~$36K profit.
**Insight:** Look for keeper/strategy contracts that call AMM add_liquidity/remove_liquidity with min/max amounts set to 1 or 0; these are sandwichable even if the caller is permissionless.

