# Synth tokens can get over-minted

Vader's mintSynth mints vSynth without locking reserveForeign collateral, letting an attacker flash-loan liquidity, over-mint synths, then burn them to drain the pool.

- Payout: Audit contest
- Severity: high
- Program: Vader Protocol
- Found by: WatchPug
- Disclosed: 2022-02-10
- Write-up quality: 8/10
- Original: https://github.com/code-423n4/2021-11-vader-findings/issues/210
- Library page: https://bugbountylibrary.com/r/c4%3A2021-11-vader%3AH-23
- Tags: area:web3 domain:web3 impact:funds-loss kind:contest platform:code4rena sev:high tech:solidity technique:source-review vuln:accounting-error vuln:business-logic vuln:flash-loan

**Target:** Vader pool synth minting (mintSynth/burnSynth)
**Root cause:** mintSynth adds nativeDeposit to the reserve but never deducts or locks reserveForeign, so synth tokens are minted against collateral that remains withdrawable by LPs.
**Steps:**
1. Create/observe a BTC-USDV Vader pool with near-zero liquidity.
2. Alice adds liquidity `100,000 USDV` + `1 BTC`.
3. Bob calls `mintSynth()` with `100,000 USDV`, receives `0.25 BTC vSynth`.
4. Alice removes all liquidity, withdrawing `200k USDV` + `1 BTC`; Bob's vSynth is now unbacked.
5. Attack variant: flash-loan `10,000 BTC`, add liquidity `10 USDV`+`10,000 BTC`, call `mintSynth()` with `10 USDV` ten times to get `1461 BTC vSynth`, remove liquidity, repay flash loan.
6. Wait for pool BTC reserve to grow, then `burnSynth()` to redeem vSynth for USDV.
**How found:** Code-reading of mintSynth against the documented guarantee of redemption liquidity: noticed nativeDeposit is credited to reserve while reserveForeign is neither deducted nor locked, implying synths are minted against withdrawable collateral.
**Exploitation:** Attacker flash-loans a large foreign-asset amount to skew the pool, mints synths cheaply against the inflated reserve, withdraws liquidity and repays the loan, then later burns the over-minted synths to extract USDV from honest LPs' liquidity.
**Escalation:** Flash loan amplifies minting capacity; deferred burnSynth converts unbacked synths into real pool funds once reserves are sufficient.
**Insight:** When a protocol mints a claim token against pool reserves, verify the counterpart reserve is actually locked/deducted at mint time, not just the deposit side; test with an LP add-mint-remove sequence to see if the minted claim survives collateral withdrawal.
