# Steal ALL collateral during liquidation by exploiting lack of validation in `flip.kick`

Missing access control and bid validation in flip.kick lets an attacker mint arbitrary DAI via end.skip and drain all collateral from end during liquidation.

- Payout: hidden
- Severity: critical
- Program: BlockDev Sp. Z o.o
- Found by: lucash-dev
- Disclosed: 2019-10-01
- Write-up quality: 8/10
- Original: https://hackerone.com/reports/684092
- Library page: https://bugbountylibrary.com/r/h1%3A684092
- Tags: area:web3 domain:web3 impact:funds-loss kind:bounty platform:hackerone sev:critical tech:evm tech:solidity technique:source-review vuln:access-control vuln:accounting-error vuln:business-logic

**Target:** flip.sol / end.sol smart contracts (MCD auction system)
**Root cause:** flip.kick lacks access control and accepts arbitrary bid/lot parameters, so anyone can create a fake auction with an arbitrary bid; end.skip then trusts that bid and issues free DAI.
**Steps:**
1. Wait until system is in liquidation phase after `end.flow` fixes the exchange rate.
2. Call `flip.kick` directly with an arbitrarily large `bid` (>= total DAI supply) and a tiny nonzero `lot` to create a fake auction.
3. Call `end.skip`; end returns the fake `bid` amount, minting free DAI to the attacker.
4. Call `end.pack` then `end.cash` to convert the free DAI into collateral, draining all collateral in `end`.
**How found:** Code review of flip.kick revealed it lacks access control and accepts all auction values (including bid) as parameters, and that end trusts the bid value returned during skip.
**Exploitation:** Attacker creates a fake auction with bid equal to total DAI supply and minimal lot, then end.skip issues that DAI for free, and end.pack/end.cash redeems it for all collateral held by end — near-zero cost (minimal gem denomination plus gas), possibly in one transaction.
**Insight:** Auction initiators that accept bid/lot as caller-supplied parameters without access control let an attacker fabricate debt; check whether downstream settlement contracts trust those values and whether the initiator can be called outside its intended caller (e.g. during liquidation).

