A flash loan is an uncollateralized DeFi loan that must be borrowed and repaid inside one blockchain transaction. If it is not repaid by the end, the whole transaction reverts as if it never ran. Lenders take no counterparty risk. They get funds back plus a fee, or nothing happens.
Flash loans let you arbitrage across DEXs without your own capital. Borrow millions, trade the price gap, repay, keep the profit, all in one block. They also enable collateral swaps, debt refinancing, and self-liquidation in lending markets. They are also the usual tool in DeFi exploits.
An attacker borrows a huge sum, moves an oracle price, drains a protocol that trusted that price, repays the loan, and keeps the difference. Flash loan attacks have drained hundreds of millions from DeFi. They showed that protocols using a single DEX spot price can be moved by anyone who can borrow for one transaction. The cost of that attack dropped close to zero.
Flash loans are powerful financial primitives. They're also the most common tool in DeFi exploits. Attackers use flash loans to temporarily control massive amounts of capital, manipulate oracle prices, drain protocols that trust those prices, and repay the loan, stealing the difference. Aave's flash loans must be borrowed and repaid in the same transaction.
If repayment fails, the whole transaction reverts.
Flash Loan Arbitrage
Borrow, arbitrage, and repay in a single transaction
Click "Execute Flash Loan" to start the arbitrage process