โšก Flash Loan Attacks: Borrow, Vote, Profit

Understand how attackers borrow tokens to manipulate votes

Defend against hostile takeovers and manipulation

โšก Flash Loan Governance Hijacking

Flash loans let you borrow millions with zero collateralโ€”repay in the same transaction or it reverts. Perfect for governance attacks. Borrow tokens โ†’ vote โ†’ execute โ†’ repay. Total time: 13 seconds. Total cost: $10K. Potential profit: $182M (Beanstalk). Here's exactly how it works.

๐ŸŽฎ Interactive: Attack Anatomy

Walk through each step of a flash loan governance attack. Click through the 7-step process attackers use to hijack DAOs.

๐Ÿ’ฐ
STEP 1 OF 7

Borrow Tokens

Flash Loan
What Happens:

Attacker borrows massive amount of governance tokens from Aave/Compound in single transaction

Example

Borrow 10M tokens (30% of supply)

Cost

$0 (repay in same transaction)

Risk Level

None yet - just borrowed

๐ŸŽฏ Beanstalk Case Study (April 2022)

The Setup: Beanstalk had 20% quorum, 24hr voting. Low participation meant easy to pass proposals.
The Attack: Attacker borrowed $1B in tokens via flash loan (from multiple protocols). Achieved 67% voting power instantly.
The Proposal: "Emergency BIP" to transfer treasury funds to attacker address. Passed immediately with borrowed votes.
The Result: $182M drained in 13 seconds. Flash loan repaid. Attacker escaped with $80M (after converting assets).
The Lesson: One transaction can destroy a DAO. Flash loans + low quorum + instant execution = catastrophic vulnerability.

๐Ÿ’ก Key Insight

Flash loan attacks work because governance tokens = voting power, and flash loans let you rent voting power for free (repay in same block). If your quorum is 20% and attacker can borrow 25% of supply, your DAO is exploitable. The solution isn't banning flash loans (impossible)โ€”it's making attacks economically unviable through timelocks, snapshot voting, and higher quorums. Defense must assume attackers have infinite borrowing capacity.

โ† Introduction