What Is Flash Loan Attack?
A flash loan attack uses the massive, uncollateralized capital available through flash loans to exploit vulnerabilities in DeFi protocols. The attacker borrows millions of dollars, uses it to manipulate a condition (typically an oracle price or pool ratio), exploits the manipulated state to extract value from a vulnerable protocol, and repays the flash loan — all in a single transaction.
How Flash Loan Attack Works
Common attack patterns: borrow $100M, use half to buy Token X on a thin DEX (spiking its price), use the inflated Token X price as collateral on a lending protocol that uses the DEX as its oracle, borrow far more than the Token X is really worth, sell the Token X, repay the flash loan, keep the excess borrowed assets. The entire attack costs only the gas fee.
Why It Matters for Traders
Flash loan attacks have extracted billions from DeFi protocols, primarily through oracle manipulation and economic logic exploits. For traders and LPs, understanding flash loan attack vectors helps evaluate protocol safety: Does the protocol use robust, manipulation-resistant oracles? Are there time delays on price updates? Are there caps on borrowing relative to collateral? Protocols that haven't addressed these vectors remain vulnerable.