Flash Loans Explained: Uncollateralized DeFi Borrowing in One Transaction
Flash loans allow borrowing millions with zero collateral — if repaid within the same transaction. This guide explains how flash loans work, legitimate use cases, and their role in DeFi attacks.
Flash loans are DeFi's most counterintuitive innovation: you can borrow $100 million with zero collateral, no credit check, and no risk to the lender — as long as you repay it all in the same transaction. The atomicity of blockchain transactions (everything happens or nothing happens) makes this possible.
How Flash Loans Work
- Borrow funds from Aave or other flash loan providers
- Execute any transaction logic with those funds (arbitrage, liquidation, collateral swap)
- Repay the loan + fee (0.05–0.09%) in the same transaction
- If the repayment cannot be made, the entire transaction reverts — lender loses nothing
Legitimate Flash Loan Use Cases
- Arbitrage: buy cheap on one DEX, sell expensive on another in one transaction
- Collateral swap: change your Aave collateral from ETH to WBTC without closing the position
- Liquidation bots: borrow capital to trigger liquidations, earn bonus, repay loan
- Self-liquidation: repay debt using collateral without separate capital
Flash Loans in DeFi Attacks
Flash loans amplify the capital available for DeFi attacks. The Beanstalk hack ($182M) used a flash loan to acquire temporary governance majority and pass a malicious proposal. Most oracle manipulation attacks use flash loans to temporarily distort prices. Flash loans are tools — their use in attacks reflects vulnerable protocol design, not flaws in flash loans themselves.