Blog / DeFi and Web3

What Are Flash Loans and Why Do They Matter?

Cointechies

Imagine borrowing a million dollars without collateral, using it for a few seconds and returning it with a small fee. In DeFi, that is possible, and it’s called a flash loan.

How it works

A flash loan is a loan that must be repaid within the same blockchain transaction. A transaction is atomic: it either completes entirely or is reversed entirely. If the borrower can’t repay by the end, the whole thing is cancelled, and the lender never loses money.

Legitimate uses

  • Arbitrage: buy an asset cheap on one exchange and sell it higher on another, with borrowed capital.
  • Collateral swaps: replace collateral on a loan without closing the position first.
  • Refinancing: move a debt to a cheaper protocol.
  • Self-liquidation: repay your own debt to avoid a liquidation penalty.
Line chart of illustrative balances during a flash loan arbitrage
If any step fails, the whole transaction is cancelled as if it never happened.

Why they matter

Flash loans give small players access to large capital, which helps prices align across markets. They also show how programmable money differs from traditional finance.

The dark side

Attackers have used flash loans to manipulate prices and exploit weak protocols. They borrow a large sum, distort a price feed the target relies on, profit and repay, all in one transaction. The loan didn’t create the bug, but it made the attack cheap.

What this means for users

  • Prefer protocols that use robust price oracles, such as time-weighted or multi-source feeds.
  • Check whether audits looked at manipulation scenarios.
  • Be aware that a protocol with a single weak price source can be vulnerable.

Do you need to use one?

Flash loans need programming skill, since you write a smart contract to execute them. Most people will never use one directly, but they affect the DeFi world you do use.

The bottom line

Flash loans are uncollateralised loans repaid in a single transaction. They offer both useful tools and a weapon for attackers.

This article is for educational purposes only and is not financial advice. Crypto assets are volatile and you can lose some or all of your investment.

Follow the market in real time on the live crypto prices page, or go back to all articles.

More from the blog

All articles