A flash loan is a unique DeFi primitive that allows users to borrow any amount of cryptocurrency without providing collateral, as long as the loan is repaid within the same blockchain transaction. If the borrower fails to repay, the entire transaction is reversed as if it never happened, ensuring the lender faces zero risk.

Flash loans are made possible by the atomic nature of blockchain transactions. A single transaction can contain multiple steps — borrowing, trading, repaying — and either all steps execute successfully or none of them do. This eliminates counterparty risk entirely.

Common use cases for flash loans include:

  • Arbitrage — exploiting price differences between decentralized exchanges without needing capital upfront.
  • Collateral swaps — instantly switching the collateral backing a loan on a lending platform.
  • Self-liquidation — repaying a loan and reclaiming collateral in one step to avoid liquidation penalties.
  • MEV extraction — searchers use flash loans to amplify arbitrage and liquidation profits.

Protocols like Aave and dYdX are among the most popular flash loan providers. Aave charges a small fee (typically 0.09%) on each flash loan.

While flash loans have legitimate uses, they have also been exploited in high-profile attacks. Attackers have used flash loans to manipulate oracle prices, drain liquidity pools, and exploit smart contract vulnerabilities. These incidents highlight the importance of robust protocol design and secure oracle implementations in DeFi.

Flash loans are a defining innovation of decentralized finance, demonstrating capabilities that have no equivalent in traditional banking.