Overview

Flash loans are a unique innovation of DeFi. They allow anyone to borrow millions of dollars worth of assets without providing any collateral, provided the funds are returned to the protocol before the blockchain transaction ends.

How it Works

If the borrower fails to repay the loan (plus a small fee) within the same block, the entire transaction is 'rolled back' as if it never happened. This ensures the lender never loses money.

Use Cases

  • Arbitrage: Profiting from price differences between exchanges.
  • Collateral Swapping: Changing the collateral in a loan without closing the position.
  • Self-Liquidation: Closing a risky position to avoid penalties.

Risks

Flash loans are often used by hackers to fund complex attacks on DeFi protocols.