Home/Blockchain/Snapshot Voting Visual/Flash Loan Protection

🛡️ Flash Loan Protection: Block Snapshots

Discover how snapshots prevent flash loan governance attacks

Vote without gas fees using off-chain signatures

🚫 How Snapshots Block Flash Loans

Flash loans let you borrow millions with zero collateral—but only for one transaction/block. Snapshot voting makes borrowed tokens worthless because voting power comes from a past block (before the flash loan existed). Attacker borrows 10M tokens at block 1,000,000? Their voting power at snapshot block 999,000 is zero. Attack blocked, no governance risk.

🎮 Interactive: Attack Timeline Comparison

Compare how flash loan attacks work against traditional voting vs snapshot voting. Step through each scenario to see where snapshot protection kicks in.

Timeline Steps

Step 1 of 5
Borrow 10M Tokens
Block Number
#1,000
Voting Power
0 votes
Status
Borrowing...

🎯 Beanstalk Could Have Been Saved

April 2022: Beanstalk lost $182M to flash loan attack. Attacker borrowed $1B in governance tokens, voted on malicious proposal, drained treasury, repaid loan—all in 13 seconds.

❌ What Went Wrong (Traditional Voting)
Voting power = current token balance
Flash loan gave attacker 67% voting power instantly
Passed malicious proposal in same transaction
No timelock = immediate execution
✅ If They Used Snapshot Voting
Voting power from block 999,000 (1 day before proposal)
Attacker had 0 tokens at that block → 0 votes
Flash loan at block 1,000,000 completely irrelevant
Attack impossible. $182M saved.

Flash Loan Requirements

Borrow & Repay Same Block: Must return funds in 12 seconds
Zero Collateral: No upfront capital needed
Small Fee: ~0.09% (e.g., $9K on $10M loan)
Voting Window: Only works if vote executes instantly

📸 Snapshot Protection

Historical Power: Uses balance from past block
Time Gap: Snapshot taken 1-7 days before proposal
Borrowed Tokens Useless: Didn't exist at snapshot block
Attack Cost: Must own tokens before proposal (no flash loans)

💡 Key Insight

Flash loans break traditional governance because voting power = current balance. Snapshot voting flips this: voting power = historical balance at snapshot block. Since flash loans can't time-travel backwards, they become worthless for governance attacks. The snapshot creates a temporal barrier—borrowed power from block 1,000,000 can't influence votes counted at block 999,000. It's like trying to vote in yesterday's election using today's ID—doesn't work.

← Introduction