# Redemption value of synths can be manipulated to drain VaderPoolV2 of all native assets in the associated pair

VaderPoolV2 mintSynth/burnSynth priced synths off manipulable pool reserves, letting a flashloan attacker mint cheap synths and burn them for profit, draining native assets.

- Payout: Audit contest
- Severity: high
- Program: Vader Protocol
- Found by: TomFrenchBlockchain
- Disclosed: 2022-05-03
- Write-up quality: 7/10
- Original: https://github.com/code-423n4/2021-12-vader-findings/issues/5
- Library page: https://bugbountylibrary.com/r/c4%3A2021-12-vader%3AH-07
- Tags: area:web3 domain:web3 impact:funds-loss kind:contest platform:code4rena sev:high tech:evm tech:solidity technique:chained vuln:flash-loan vuln:oracle-manipulation

**Target:** VaderPoolV2 AMM pool mintSynth/burnSynth
**Root cause:** Synth mint/burn exchange rate is derived from spot pool reserves, which are flashloan-manipulable, instead of a manipulation-resistant oracle.
**Steps:**
1. Flashloan and sell a huge amount of `foreignAsset` into the pool so `nativeAsset` appears extremely valuable.
2. Mint synths with a small amount of `nativeAsset` via `VaderPool.mintSynth`, receiving a huge synth amount at the inflated rate.
3. Buy back the `foreignAsset` to restore (or push down) `nativeAsset` price.
4. Burn all synths; since `nativeAsset` is now cheap, payout requires far more `nativeAsset` than was spent minting.
5. Repeat while profitable, extracting `nativeAsset` from the pool for flashloan + swap fees.
**How found:** Code review of `VaderPool.mintSynth` revealed the exchange rate is computed from pool reserves, which are flashloan-manipulable like UniswapV2.
**Exploitation:** Attacker flashloans foreignAsset, dumps it to skew reserves, mints synths cheaply at the inflated nativeAsset price, reverses the swap to normalize price, then burns synths to redeem at the favorable rate, netting nativeAsset from the pool minus fees.
**Escalation:** Manipulation can be split across multiple trades to mitigate the slip mechanism, and repeated as long as profitable.
**Insight:** When a protocol prices mint/burn or redemption off AMM spot reserves, check whether a flashloan can skew reserves between mint and burn; splitting swaps can bypass slip/fee mitigations.
