BTC—ETH—SOL—XRP—BNB—ADA—DOGE—TRX—LINK—AVAX—DOT—LTC—
Live

What is a blockchain oracle, and why do price feeds get gamed

A blockchain oracle feeds outside prices to smart contracts, and that number is often the real target. How price feeds work, why attackers manipulate them, and what the Mango Markets, KiloEx and Ostium cases show.

By Himanshu Sakre

Published · 6 min read

A blockchain oracle is a service that feeds outside information, most often asset prices, to the smart contracts running on a blockchain. The chain cannot see the outside world on its own. Oracles fill that gap. They also sit behind some of the largest thefts in decentralized finance, because a wrong price can be turned into real money.

What a blockchain oracle actually does

Blockchains are closed systems. A chain only knows what is already written on it, so it cannot read a stock price, a weather report, or the dollar value of a coin without help. An oracle is the help. It sources data off-chain, checks it, and delivers it on-chain in a form a smart contract can act on.

Pyth Network, one of the larger providers, describes an oracle as a bridge between a blockchain and the outside world. The hard part is trust. A smart contract does exactly what its code says, so a single bad number can send it in the wrong direction. Builders call this the oracle problem: how to deliver outside data that is reliable and hard to fake, without handing one party control of the switch.

How a price feed is built

Most oracle demand is for prices. A price feed is simply an oracle that publishes the going rate of an asset so contracts can use it.

The stronger designs do not trust one source. A decentralized oracle network uses many independent operators, each pulling the price from several venues. The network then combines those numbers, often by taking the median, and writes a single agreed figure on-chain. The median matters. If one operator reports a wild value, the middle number ignores it. Pyth says its on-chain program aggregates publisher submissions to remove outlier influence, and it pays or penalizes contributors based on the quality of their data.

Two models dominate. In a push feed, the oracle updates the on-chain price on a schedule or when it moves past a set threshold. In a pull feed, the contract requests the latest price at the moment it needs it. Chainlink is the best known push-style network. Pyth leans on the pull model, with exchanges and trading firms posting their own prices directly. Both aim at the same thing. Get an honest number on-chain, fast, with no single point of failure.

Where oracle prices end up

Oracle prices are not a side feature. They are the trigger for much of what moves money in decentralized finance, or DeFi.

A lending protocol checks an oracle to decide whether a loan is still safe. A stablecoin uses one to know if it is holding its peg. A perpetual futures venue reads a feed to mark positions and settle funding. And when a borrower's collateral falls too far, it is an oracle price, not a human, that signals the liquidation. Feed the contract a false price and all of that logic runs on a lie.

Why oracles get attacked

Here is the uncomfortable part. If the number is the trigger, the number is the target.

Price-feed manipulation has produced some of the largest losses in DeFi, alongside the repeated draining of cross-chain bridges. The playbook is old. An attacker pushes a thinly traded market to a false price, or finds a feed that reads from too few venues, then borrows or withdraws against the inflated value before anyone corrects it. The weakness is rarely the math of the token. It is the price the protocol chose to believe.

The case that reached a courtroom was Mango Markets. In October 2022, the trader Avraham Eisenberg drained about $110 million from the Solana-based protocol by trading its MNGO token between his own accounts to inflate the price, then borrowing against the puffed-up collateral. A New York jury convicted him in 2024. Then it unwound. In May 2025, US District Judge Arun Subramanian threw out the fraud and manipulation convictions, ruling the case was filed in the wrong court and that prosecutors had not proven a false statement to the platform. The Justice Department has not said whether it will try again. Eisenberg remains in prison on an unrelated charge.

Newer cases follow the same shape. In April 2025, the trading platform KiloEx lost about $7 million after what the analytics firm Cyvers called a flaw in its price oracle let an attacker feed the system false prices. KiloEx suspended operations and offered the attacker a bounty to return most of the money. A year on, in July 2026, the perpetuals venue Ostium lost roughly $18 million in USDC, close to a third of its pool, when attackers got hold of an oracle signing key and pushed through fake, future-dated prices. The security firm Blockaid flagged it, and Ostium paused all trading while it investigated.

How protocols try to protect the feed

No oracle is bulletproof, but the defenses are well understood.

Spreading the data helps most. A feed that reads from many exchanges and many independent operators is far harder to move than one wired to a single market. Time-weighted average prices, which smooth a figure over minutes rather than taking one snapshot, blunt a sudden spike. Some protocols add sanity limits that reject a price which jumps too far too fast, or pause lending when a feed looks wrong. None of this is free. More sources and more checks mean higher cost and slower updates, and a feed that updates slowly can miss a real, fast move. Security here is a set of trade-offs, not a switch.

What to watch

Oracles stay quiet until they are not. For a reader, the useful habit is to notice what a protocol trusts for its prices. A project that names its oracle provider, reads from several venues, and publishes how its feed works is making a clearer bet than one that stays vague. Regulators are circling the question too, after the Mango Markets ruling showed how hard oracle manipulation can be to prosecute. Expect more fights over whether gaming a price feed is a clever trade or a crime. The code will keep doing what the number tells it. The argument is over who controls the number.

Frequently asked

What is a blockchain oracle in simple terms?

A blockchain oracle is a service that brings outside information, usually asset prices, onto a blockchain so smart contracts can use it. Blockchains cannot read the outside world on their own. The oracle sources the data, checks it, and posts it on-chain, where lending, trading, and stablecoin contracts rely on it to work.

What is oracle price manipulation?

Oracle price manipulation is an attack that feeds a protocol a false price so the attacker can profit. The usual move is to push a thinly traded market to a fake value, or exploit a feed that reads from too few sources, then borrow or withdraw against the wrong number. Mango Markets and KiloEx are documented examples.

Which companies run crypto price oracles?

Chainlink and Pyth Network are the two best known crypto oracle providers. Chainlink uses a network of independent operators that push prices on-chain. Pyth has exchanges and trading firms publish their own prices, which users pull when needed. Several smaller networks compete with them, and many DeFi protocols read from more than one.

Sources, and what is behind them

  1. What is a blockchain oracle?, Pyth NetworkDocumentation
  2. Mango Markets exploiter convicted of fraud and manipulation over $110M heist, CoinMarketCapOther
  3. US judge overturns fraud convictions of Mango Markets exploiter Eisenberg, determining improper venue, The Block (May 24, 2025)Press report
  4. DEX KiloEx loses $7M in apparent oracle manipulation attack, CoinDesk (April 15, 2025)Press report
  5. DeFi exploit: Perp DEX Ostium loses $18 million in oracle attack, Decrypt (July 15, 2026)Press report