# Circle: UniV2 CDP price manipulation drains USDC

Attacker used a Maker flash loan to manipulate a UniV2 DAI-USDC CDP, burning LP tokens to drain USDC from Circle's market for ~$151.6K.

- Payout: Real-world hack
- Severity: high
- Program: Circle
- Analysis by: DeFiHackLabs
- Disclosed: 2022-08-16
- Write-up quality: 6/10
- Original: https://github.com/SunWeb3Sec/DeFiHackLabs/blob/main/src/test/2022-08/Circle_exp2.sol
- Library page: http://bugbountylibrary.com/r/dhl%3A20220816-circle-exp2
- Tags: area:web3 domain:web3 impact:funds-loss kind:incident platform:defihacklabs sev:high tech:evm tech:solidity vuln:business-logic vuln:flash-loan vuln:oracle-manipulation

**Target:** MakerDAO CDP / UniV2 DAI-USDC LP / Circle USDC market
**Root cause:** Circle's USDC market relied on a UniV2 DAI-USDC LP position whose value could be manipulated by burning LP tokens and swapping, letting the attacker extract more USDC than collateral value.
**Steps:**
1. Flash loan 7.3M DAI from Maker pool `0x1EB4CF3A948E7D72A198fe073cCb8C7a948cD853`
2. Read urn 28311 ink/art for ilk `UNIV2DAIUSDC-A`
3. Join DAI into MCD join, then `frob(28311, -ink, -art)` to free collateral
4. `flux` the UniV2 LP tokens to attacker, `exit` from UniV2 pool
5. `burn` the LP tokens to receive DAI+USDC
6. Approve USDC to allower and call `sellGem` on MCD to convert USDC to DAI
7. Repay flash loan, keep remaining USDC (~$151.6K)
**Exploitation:** Flash-borrowed DAI, freed the UniV2 DAI-USDC LP collateral from CDP 28311, burned LP tokens to obtain USDC, sold USDC via MCD sellGem, repaid loan and kept profit.
**Insight:** CDPs collateralized by AMM LP tokens are manipulable: burning LP tokens directly converts collateral into the underlying assets at current pool ratio, so check whether the protocol prices LP collateral via spot reserves rather than a manipulation-resistant oracle.

