Flash Loan Patterns
Web3 / smart contracts
Flash loan patterns are smart contract design paradigms that enable uncollateralized loans provided and repaid within a single atomic transaction, typically used for arbitrage, liquidations, or collateral swaps. Flash loans allow users to borrow massive amounts of capital instantly, provided the loan plus a fee is repaid before the transaction completes; if repayment fails, the entire transaction reverts, ensuring lenders face no default risk. These patterns have enabled sophisticated trading strategies and liquidity operations but have also been exploited in various attacks where borrowed capital combined with contract vulnerabilities led to protocol losses. Flash loans represent a purely blockchain-native financial primitive with no traditional finance equivalent, exemplifying DeFi's novel capabilities and risks. Example: Aave's flash loans allow developers to borrow any amount of supported tokens within a transaction, which became prominent during the bZx attack where flash loans were combined with price oracle manipulation to extract protocol value. Why it matters for smart contracts: Flash loans enable capital-efficient operations and arbitrage but require robust checks against oracle manipulation and reentrancy, making secure pattern implementation critical for DeFi protocol safety.
Explore the full Web3 Glossary — 2,062+ expert-curated definitions. Need guidance? Talk to our consultants.