Oracle manipulation is a type of attack on decentralised finance in which someone deliberately distorts the data that a blockchain oracle supplies to smart contracts. Most often the target is a price. If an attacker can make a lending or trading protocol believe that a token is worth far more or far less than its real market value, they can borrow too much against it, liquidate others unfairly or buy assets from the protocol at the wrong price.
These attacks have caused some of the largest losses in DeFi. They usually exploit a design weakness rather than a bug in the oracle's code: a protocol reads a price from a source that is thin, easy to move or updated too slowly. Oracle manipulation is a blockchain-specific form of market manipulation and is often combined with a flash loan attack, which gives an attacker large temporary capital at almost no cost.
Oracle manipulation in plain terms
Imagine a pawnshop that values jewellery by checking the last sale price at one tiny market stall. A trickster buys a ring from that stall at a ridiculous price, making it look like rings are suddenly worth a fortune. They then walk into the pawnshop with a similar ring, borrow against the inflated value and never come back.
The pawnshop did nothing wrong in its arithmetic. Its mistake was trusting a price source that one person could move cheaply. In DeFi, the "stall" is often a small trading pool, and the whole trick can happen within a single transaction lasting seconds.
How oracle manipulation attacks work
- Acquire capital. The attacker borrows a large amount through a flash loan or uses their own funds.
- Move the reference price. They make large trades in a thin liquidity pool on an automated market maker, or in a low-volume market, pushing the reported price up or down sharply.
- Exploit the target protocol. While the price is distorted, the attacker borrows against overvalued collateral, triggers liquidations or trades with the protocol at favourable rates.
- Unwind. They reverse the trades, repay any flash loan and keep the difference.
Other variants include bribing or compromising the operators of a centralised oracle, exploiting stale prices during network congestion, and manipulating the price of an illiquid governance token that a protocol accepts as collateral.
Notable cases
- bZx (2020). In February 2020, attackers used flash loans and price movements on decentralised exchanges to profit from the bZx lending platform, in some of the earliest widely reported DeFi oracle attacks.
- Harvest Finance (2020). In October 2020, an attacker repeatedly moved stablecoin prices in a Curve pool that Harvest relied on, extracting roughly 24 million dollars.
- Mango Markets (2022). In October 2022, a trader pushed up the price of the MNGO token on thin markets, used the inflated position as collateral on Mango Markets and withdrew more than 100 million dollars in assets. He publicly described it as a "highly profitable trading strategy". He was charged by US authorities and convicted by a jury in 2024, but in 2025 the trial judge set aside the convictions.
The cost of these attacks usually falls on ordinary users. Lenders who supplied assets to a drained pool may find that the protocol is insolvent, and holders of its governance token often see its value collapse. Some protocols have negotiated with attackers to return part of the funds in exchange for a "bounty", and others have used treasury reserves or insurance funds to cover losses, but recovery is far from guaranteed.
Defences
- Decentralised price feeds. Aggregating prices from many exchanges and data providers, as networks such as Chainlink do, makes a single pool much harder to use as a lever.
- Time-weighted averages. Using a price averaged over minutes or hours, rather than the latest trade, makes one-transaction attacks far more expensive.
- Collateral limits. Protocols set caps, higher collateral requirements and careful listing standards for thinly traded tokens.
- Circuit breakers and sanity checks. Contracts can pause or reject prices that move beyond expected bounds or diverge too far between sources.
- Audits and simulations. Independent reviews and stress tests check how a protocol behaves when its price inputs are pushed to extremes.
Legal treatment
Whether oracle manipulation is a crime or simply aggressive use of open code has been debated. Some attackers have argued that they only used the protocol as written. Prosecutors and regulators, including the CFTC, have treated deliberate price distortion as manipulation or fraud, but court outcomes have been mixed and depend on the facts and on how existing laws apply to decentralised systems. Separately, the profit available from honest oracle updates, rather than distorted ones, is discussed under oracle extractable value.