What is oracle manipulation?

Oracle manipulation is an attack where someone moves the price a protocol relies on so that it values assets wrongly, then borrows, mints or liquidates against the false price. Thin liquidity, spot prices read from a single pool and slow or single-source oracles make it possible. Chainalysis estimated DeFi protocols lost $403.2 million to 41 oracle manipulation attacks in 2022.

How it works

  1. The attacker finds a protocol that reads the price of an asset from somewhere they can influence, often the reserves of a single DEX pool.
  2. They move that price, frequently with flash loaned funds, by trading heavily in a low-liquidity pool.
  3. While the price is distorted, they borrow against inflated collateral, mint assets cheaply or trigger liquidations.
  4. They exit, leaving the protocol with bad debt.

The false price only needs to hold for one block.

Where protocols go wrong

  • Reading spot prices from AMM reserves.
  • Relying on a single source with no sanity checks.
  • Accepting stale prices or ignoring L2 sequencer downtime.
  • Accepting illiquid assets as collateral.
  • Treating a vault’s share price, which can itself be manipulated, as an oracle.

Safer design

  • Use established decentralised feeds with freshness checks, or carefully designed TWAPs.
  • Combine sources and reject prices that deviate too far.
  • Limit exposure to illiquid collateral.
  • Model the economics as well as the code. Read our deep dive on oracle manipulation.
Questions

Frequently asked questions

Is using Chainlink enough?

A decentralised feed is far harder to move than a spot price, but it still needs handling: check for stale updates, sequencer downtime on L2s, deviation thresholds and what happens if the feed stops.

What is a TWAP?

A time-weighted average price, which averages a pool's price over a period. It is harder to manipulate within one transaction but can lag the market and can still be moved over time on thin liquidity.

Sources

Published Updated

Talk to the people who would do the work.