# Curve V2 Vaults can be drained because CurveV2CryptoEthOracle can be reentered with WETH tokens

Tokemak's CurveV2CryptoEthOracle only enables reentrancy checks for native-ETH pools, but Curve V2 WETH pools accept ETH via use_eth, enabling read-only reentrancy to inflate prices and drain LMPVaults.

- Payout: Contest reward
- Severity: high
- Program: Tokemak
- Credited: 0x007
- Disclosed: 2023-06-30
- Write-up quality: 8/10
- Original: https://github.com/sherlock-audit/2023-06-tokemak-judging/issues/481
- Library page: https://bugbountylibrary.com/r/sherlock%3A2023-06-tokemak%3AH-5
- Tags: domain:web3 impact:funds-loss kind:contest platform:sherlock sev:high tech:evm tech:solidity technique:source-review vuln:accounting-error vuln:oracle-manipulation vuln:reentrancy

**Target:** CurveV2CryptoEthOracle / LMPVault debt pricing
**Root cause:** registerPool only sets checkReentrancy for pools containing 0xEeee...EEeE, but Curve V2 pools use WETH and still accept ETH via use_eth, so getPriceInEth skips the claim_admin_fees reentrancy guard.
**Steps:**
1. Identify Curve V2 pool with WETH (e.g. CRV/ETH 0x8301AE4fc9c624d1D396cbDAa1ed877821D7C511, coins WETH+CRV).
2. Register pool in CurveV2CryptoEthOracle with checkReentrancy=false since tokens are WETH not 0xEeee.
3. Deposit shares into LMPVault at fair price.
4. Call Curve remove_liquidity_one_coin(..., use_eth=true) so pool sends raw ETH to attacker, reentering LMPVault.
5. During reentrancy call updateDebtReporting; getPriceInEth reads manipulated pool state (no claim_admin_fees guard).
6. Withdraw shares at inflated price to drain vault assets.
**How found:** Noticed the oracle's reentrancy guard only checks for 0xEeee native ETH, then inspected the actual Curve V2 pool code and saw coins are WETH, and that exchange/add/remove functions expose use_eth which sends raw ETH callbacks—contradicting the guard's assumption.
**Exploitation:** Attacker deposits at fair price, triggers Curve V2 withdrawal with use_eth=true to receive raw ETH callback, reenters LMPVault during the callback to update debt reporting against a manipulated pool price, then withdraws shares at the inflated valuation, extracting more assets than deposited. Bundleable in a flash loan.
**Escalation:** Read-only reentrancy chained with debt reporting update to inflate share price, scaling to full vault drain across all WETH-based Curve V2 pools Tokemak uses.
**Insight:** When a protocol gates a safety check on a sentinel address (0xEeee) for native ETH, verify whether the underlying pool also accepts ETH via a use_eth flag while listing WETH as its coin—read-only reentrancy guards keyed on token address can be bypassed by wrapper-token pools that still emit native ETH callbacks.
