Flash loans are one of DeFi’s most powerful innovations: borrow any amount, use it however you want, and repay it—all in a single transaction. If you don’t repay, the entire transaction reverts as if it never happened.
How It Works
- Smart contract borrows from flash loan pool
- Uses funds for any operations (arbitrage, liquidation, etc.)
- Returns principal + small fee (~0.09%)
- If not repaid, transaction reverts automatically
Use Cases
- Arbitrage — Exploit price differences across DEXes
- Liquidations — Liquidate positions without capital
- Collateral swaps — Change lending collateral atomically
- Self-liquidation — Unwind your own positions
Risks and Attacks
Flash Loan Attacks
Flash loans have been used in numerous exploits, typically to manipulate prices within a single block. Protocols must design oracle and timing mechanisms carefully.
Key Takeaways
- Borrow any amount, repay in same transaction
- No collateral needed—atomicity is the guarantee
- Enables arbitrage and liquidations without capital
- Small fee (~0.09%) for the service
- Powerful tool but also used in exploits