# AmpKashi: AMP collateral price manipulation via DEX spot pump

Attacker flash-borrowed WETH, pumped AMP spot price across three DEX pools, deposited inflated AMP as Kashi collateral, and borrowed USDC against it for $572 profit.

- Payout: Real-world hack
- Severity: medium
- Program: AmpKashi
- Credited: DeFiHackLabs
- Disclosed: 2025-04-07
- Write-up quality: 6/10
- Original: https://github.com/SunWeb3Sec/DeFiHackLabs/blob/main/src/test/2025-04/AmpKashi_exp.sol
- Library page: https://bugbountylibrary.com/r/dhl%3A20250407-ampkashi
- Tags: domain:web3 impact:funds-loss kind:incident platform:defihacklabs sev:medium tech:evm tech:solidity technique:chained vuln:flash-loan vuln:oracle-manipulation

**Target:** Kashi AMP/USDC lending pair on BentoBox
**Root cause:** Kashi collateral valuation relied on manipulable spot AMP price; attacker inflated AMP via large DEX buys before depositing as collateral, letting the pair over-lend USDC.
**Steps:**
1. Flash-borrow `4.71 WETH` from Balancer Vault
2. Buy AMP with WETH across Uniswap V3 (`0.3768 WETH`), Uniswap V2 (`1.6956 WETH`), SushiSwap (`2.6376 WETH`) to inflate AMP spot price
3. Call `kashiPair.accrue()` and `bentoBox.setMasterContractApproval` for the pair
4. `bentoBox.deposit(amp, ...)` then `kashiPair.addCollateral(address(this), false, ampShare)` with inflated AMP
5. `kashiPair.borrow(address(this), 7_664_071_837)` USDC and `bentoBox.withdraw` the shares
6. Swap minimal USDC back to `4.71 WETH` via Uniswap V3 `exactOutputSingle`, repay Balancer, keep remaining USDC
**Exploitation:** Single-transaction flash loan: borrow WETH, pump AMP spot across three pools, deposit inflated AMP as Kashi collateral, borrow USDC, repay flash loan, pocket ~$572.
**Insight:** Kashi/BentoBox collateral is valued at spot; any AMP market with thin DEX liquidity can be pumped within one tx to mint borrow capacity. Check whether the pair's oracle is a TWAP or raw spot before assuming safety.
