# Hardcoded `useEth = true` in `remove_liquidity_one_coin` or `remove_liquidity` lead to stuck fund

CurveConvex2Token hardcodes useEth=true on pool exit, so WETH pools return native ETH that never gets wrapped, leaving funds stuck and withdrawals returning zero.

- Payout: Audit contest
- Severity: high
- Program: Notional
- Found by: elolpuer
- Disclosed: 2025-06-27
- Write-up quality: 7/10
- Original: https://github.com/sherlock-audit/2025-06-notional-exponent-judging/issues/691
- Library page: https://bugbountylibrary.com/r/sherlock%3A2025-06-notional-exponent%3AH-9
- Tags: area:web3 domain:web3 impact:funds-loss kind:contest platform:sherlock sev:high tech:evm tech:solidity technique:source-review vuln:accounting-error vuln:business-logic

**Target:** CurveConvex2Token single-sided LP vault (Curve V2 pool integration)
**Root cause:** _exitPool passes useEth=true unconditionally to remove_liquidity/remove_liquidity_one_coin; for pools whose ETH_INDEX coin is WETH (not native ETH), Curve sends native ETH to the vault, but unstakeAndExitPool only re-wraps when TOKEN_1/TOKEN_2 == ETH_ADDRESS, so ETH is never converted back to WETH.
**Steps:**
1. Deploy YS vault over a Curve V2 pool where ETH_INDEX=0 is WETH (e.g. tETH or cvxETH pool) and TOKEN_1=WETH.
2. Enter pool single-sided with WETH: msgValue=0 so add_liquidity uses use_eth=false; Curve pulls WETH and unwraps internally.
3. Call unstakeAndExitPool -> _exitPool which invokes remove_liquidity_one_coin(poolClaim, PRIMARY_INDEX, min, true, address(this)) or remove_liquidity(poolClaim, minAmounts, true, address(this)).
4. Curve's remove_liquidity sees use_eth=true and i==ETH_INDEX, so it raw_calls native ETH to the vault instead of WETH.
5. unstakeAndExitPool checks ASSET==WETH true but TOKEN_1/TOKEN_2 != ETH_ADDRESS, so no WETH.deposit; native ETH sits idle.
6. Withdraw/redeem: _burnShares measures WETH balance delta = 0, so assetsWithdrawn=0 and user receives nothing.
**How found:** Code-reading: noticed add_liquidity derives use_eth from msgValue (false for WETH), but exit paths hardcode true; cross-checked Curve V2 source to confirm ETH_INDEX=0 pools with WETH coin send native ETH, then traced unstakeAndExitPool's wrap condition and _burnShares balance-delta accounting to confirm the stranded funds.
**Exploitation:** Any user exiting a WETH-based Curve V2 pool via the vault triggers the mismatch; native ETH accumulates in the vault and is excluded from WETH balance accounting, so redemptions compute zero assets and funds are effectively stuck/lost.
**Insight:** When integrating AMMs that treat native ETH and WETH as the same coin index, audit that entry and exit use_eth flags are symmetric and derived from the actual coin address, not hardcoded; balance-delta accounting silently reports zero when the wrong asset form is returned.

