SardineCon SF/2026

Learn More
Crypto & blockchain crime4 分で読めます

Flash loan attackとは?

SUBSCRIBE

A flash loan attack borrows a huge, uncollateralized sum inside a single transaction, uses it to manipulate prices, oracles, or protocol state, and repays it in the same block, all with almost no money down. It lets an attacker move markets and drain protocols using borrowed funds they never truly held.

What is a flash loan attack, in plain English?

A flash loan is a DeFi feature that lets you borrow a very large amount with no collateral, on one condition: you must repay it within the same transaction. If you do not repay by the end of that transaction, the whole thing is cancelled as if it never happened. Legitimately, this is used for things like arbitrage. In an attack, it becomes a way to wield enormous capital for a split second.

The attacker borrows a massive sum, then uses that temporary firepower to manipulate prices, oracles, or protocol state, tricking a target protocol into releasing funds it should not. They pull out the profit, repay the loan, and keep the difference, all inside a single block. The startling part is that they never needed the money; they only needed to hold it for an instant.

This works because of atomicity: a blockchain transaction either fully succeeds or fully reverts. If any step of the attack fails, including repaying the loan, the entire sequence unwinds. That guarantee is what lets an attacker safely orchestrate borrow, manipulate, and repay as one indivisible move.

How a flash loan attack executes

  1. Borrow — Take a huge uncollateralized loan. The attacker borrows a massive sum within a single transaction, no collateral required.
  2. Manipulate — Distort the target. The borrowed funds are used to swing a price, feed an oracle bad data, or alter protocol state.
  3. Extract — Pull out the profit. The manipulated protocol releases more value than it should, which the attacker captures.
  4. Repay — Close the loan in the same block. The loan is repaid and the profit kept; if any step failed, the whole transaction reverts.

Who is involved?

Who

Their role

The attacker

Crafts the single-transaction sequence that borrows, manipulates, extracts, and repays.

The lending protocol

Provides the uncollateralized flash loan, unaware of how it will be used.

The target protocol

Relies on a price or oracle that the attack distorts, and loses the funds.

Investigators

Detect the same-block pattern and trace the extracted funds downstream.

What it looks like in practice

In practice

An attacker borrows an enormous amount of a token through a flash loan. In the same transaction, they dump it into a thin liquidity pool that a lending protocol uses as its price reference, briefly crashing or spiking the quoted price.

With the price distorted, they borrow against overvalued collateral or redeem at a wrong rate, extracting far more than they put in. They repay the flash loan, and the leftover profit is theirs. The whole thing happens in one block, with essentially no starting capital. Minutes later the extracted funds are already moving toward a mixer, and the on-chain record shows a single borrow-manipulate-repay transaction.

Why it matters to operators

Flash loan attacks collapse the usual assumption that moving markets requires capital. Because a borrower can command huge sums for one transaction, any protocol that trusts an easily swung price or a shallow liquidity pool as its source of truth is exposed. The attack itself is over the instant the block confirms, so there is no chance to intervene mid-attack; the whole exploit is atomic.

That means detection and response are about pattern and aftermath. Analysts look for the tell-tale same-block borrow, manipulate, repay sequence and for sharp, unnatural price or liquidity swings. Once identified, the priority shifts to tracing and freezing the extracted funds downstream, since that is the only value left to recover after the borrowed capital has been returned.

What to watch in the data

  • Same-block borrow and repay. A large loan taken and returned within one transaction is the defining flash loan pattern.
  • Sharp, unnatural price swings. A brief violent move in a price or pool, then a snap back, points to manipulation.
  • Thin-pool targeting. Attacks favor shallow liquidity pools that a big temporary sum can move easily.
  • Oracle dependence. Protocols pricing off an easily swung feed are the usual victims; watch their state around the event.
  • Immediate downstream laundering. Extracted funds heading straight into mixers or bridges right after the block confirms.

Quick questions

How can someone borrow millions with no collateral?

Because a flash loan must be repaid in the same transaction. If repayment does not happen, the entire transaction reverts, so the lender is never actually at risk. The borrower only ever controls the funds for a single indivisible moment.

What does atomicity mean here?

A blockchain transaction either fully completes or fully reverts, with no partial state. That guarantee lets an attacker chain borrow, manipulate, extract, and repay into one transaction that only succeeds if every step, including repayment, works.

Are flash loans themselves malicious?

No. Flash loans are a legitimate DeFi tool, commonly used for arbitrage and refinancing. The attack is the misuse of them to manipulate a vulnerable protocol. The loan mechanism is neutral; the target's weak price source is the real flaw.

What makes a protocol vulnerable?

Relying on an easily manipulated price source, such as a single thin liquidity pool or an oracle that can be swung within one block. If a temporary flood of capital can move the protocol's source of truth, it is exposed.

Can the attack be stopped once it starts?

Not really. It executes and settles in a single block, so there is no window to intervene mid-attack. Defense is about hardening protocols beforehand and tracing the extracted funds afterward.

What can investigators recover?

Only the extracted profit, since the borrowed principal is repaid within the transaction. The realistic goal is to trace that profit as it moves downstream and coordinate to freeze it at exchanges or off-ramps before it clears.

Go deeper

  • FATF ↗ — The global standard-setter for AML, counter-terrorist-financing, and counter-proliferation. Recommendations, guidance, and jurisdiction lists.
  • OFAC, US Treasury ↗ — Administers US sanctions programs, the SDN list, and licensing.

Flash loan attackと併せて知っておきたい用語