Skip to content
AdvancedLook up a term

What is a flash loan?

Author
CRYPTO PORT Editorial
Published
Updated
Reading time
5 min

In short

A flash loan lets you borrow without collateral on one condition: the loan must be repaid inside the very same transaction. If it is not, the whole transaction reverts and never happened, so the lender cannot lose. It powers arbitrage and refinancing — and it has also been the standard tool in a long line of price-manipulation attacks.

Key points

  • Borrow and repay within a single transaction
  • Failure to repay reverts the entire transaction
  • No collateral is needed because default is impossible
  • It has repeatedly been the vehicle for manipulation attacks

Definition

An uncollateralised loan whose validity depends on being repaid within the same blockchain transaction; if repayment does not occur, the transaction fails and the borrowing is never recorded.

A blockchain transaction reverts in full if any condition inside it fails, and flash loans build on exactly that. The protocol hands over the funds, then checks at the end of the call whether they came back. If they did not, everything unwinds and the money never moved — which is why no collateral is required.

The classic use is arbitrage. When a token trades at different prices on two DEXes, a trader with no capital of their own can borrow, buy on the cheap venue, sell on the expensive one, repay, and keep the difference. The same trick refinances a lending position into different collateral, or funds a liquidation. None of it depends on how much money the user actually has.

The same property serves attackers. Because enormous sums can be wielded for one instant, a thin pool's price can be pushed far off, and any protocol reading that price naively can then be drained. Flash loans are not themselves the vulnerability: they make it cheap to exploit protocols that source prices carelessly.

Watch out for

  • · A failed flash loan transaction still costs gas, and complex routines cost a lot of it
  • · Protocols that read prices from a single DEX are the natural targets of flash loan manipulation
  • · Even packaged flash-loan tools can trigger unexpected liquidations or losses if you do not understand what they execute

Related coins

Read next

Crypto quizzes

Answer a few questions and get your result instantly.

Start