# Conic Finance: crvUSD omnipool price manipulation drains $934K

Conic Finance's crvUSD omnipool was drained of ~$934K by sandwiching its deposit/withdraw price updates with large crvUSD swaps.

- Payout: Real-world hack
- Severity: critical
- Program: Conic Finance 02
- Analysis by: DeFiHackLabs
- Disclosed: 2023-07-22
- Write-up quality: 7/10
- Original: https://github.com/SunWeb3Sec/DeFiHackLabs/blob/main/src/test/2023-07/Conic02_exp.sol
- Library page: https://bugbountylibrary.com/r/dhl%3A20230722-conic02
- Tags: area:web3 domain:web3 impact:funds-loss kind:incident platform:defihacklabs sev:critical tech:evm tech:solidity technique:chained vuln:business-logic vuln:flash-loan vuln:oracle-manipulation

**Target:** ConicPool (crvUSD omnipool) and Curve crvUSD/USDT/USDC pools
**Root cause:** ConicPool.deposit/withdraw rebalances into Curve crvUSD pools using spot prices, so an attacker who moves those pool prices with large swaps can make the pool mint/burn LP at manipulated rates.
**Steps:**
1. Flash-loan `12_000_000 USDC`, `80_000 WETH`, `9_000_000 USDT` from Balancer.
2. `crvUSDController.create_loan(80_000 ether, 93_000_000 ether, 10)` to borrow 93M crvUSD against WETH.
3. Swap `19_000_000 crvUSD` to USDT and `27_000_000 crvUSD` to USDC via `crvUSD_USDT_Pool.exchange(1,0,...)` and `crvUSD_USDC_Pool.exchange(1,0,...)` to push crvUSD price down.
4. `ConicPool.deposit(crvUSD.balanceOf(this), 0, false)` to add crvUSD at the depressed price.
5. Swap USDC/USDT back to crvUSD to push price up, then `ConicPool.withdraw(cncCRVUSD.balanceOf(this), 0)`.
6. Repeat the sandwich three times via `sandWich()`.
7. Swap remaining crvUSD to USDT/USDC, repay Balancer flash loan, then repay the crvUSD loan.
**Exploitation:** Attacker flash-borrowed ~$21M, borrowed 93M crvUSD from Curve, used large swaps to manipulate crvUSD pool prices around ConicPool deposit/withdraw calls, extracting value from the omnipool's rebalancing, then unwound positions and repaid the flash loan.
**Escalation:** Repeated the deposit/withdraw sandwich three times to compound the extracted value.
**Insight:** When a yield aggregator rebalances into an AMM using spot prices, its deposit/withdraw entry points become sandwichable: check whether LP mint/burn amounts depend on pool balances you can move within one transaction.

