A blockchain oracle is the service that reports off-chain data onto a chain so a smart contract can act on it: a price, an interest rate, a reserve balance, a settlement confirmation. Chains cannot reach outside themselves, so anything a contract knows about the world arrived through an oracle. This is unrelated to the enterprise database company of the same name. The design question is not which oracle you pick. It is what your contract does on the day the number it reads is wrong.
An oracle reports a number. It does not promise the number is correct, and an aggregated price feed makes no promise at all about the depth of the markets that number came from. Every large oracle loss on record sits in the gap between what the feed guarantees and what the integrating protocol assumed it guaranteed.
Scroll to see the full diagram
Why a chain needs one at all
Chainlink's education material states the problem in one line: blockchains cannot access external data, which makes them isolated networks, similar to a computer with no internet connection.1 Consensus can verify what happened inside the chain. It has no way to verify a fact about anything outside it. An oracle is the reporter bolted onto that machine, and the machine has no ability to check the report.
Read that as a commercial fact. The moment a lending market, a perpetual venue, a stablecoin or a tokenized fund reads a price, the solvency of that business sits downstream of a number a third party publishes. It is a dependency of the same class as a custodian, and it deserves the same diligence budget.
Spot, TWAP, and what each one resists
A spot price is whatever the venue quotes right now. It is the freshest possible input and the cheapest possible thing to move, because an attacker can borrow, distort the pool, read the distorted price and repay inside a single transaction. Uniswap's v2 documentation frames its oracle design around exactly this, using cumulative prices to build manipulation-resistant time-weighted average price feeds.2 A TWAP reads a price accumulator at two points and divides by the elapsed time, so distorting it means holding the distorted price across blocks rather than for one atomic call.
The cost of that resistance is latency, and founders discover it late. A thirty minute TWAP is, by construction, thirty minutes behind during a fast repricing, so a liquidation engine reading it values collateral at the old number precisely when the market has moved. Spot buys freshness and sells manipulation resistance. TWAP does the reverse. Picking one is picking which failure you would rather have, and that decision belongs in writing before launch.
What an aggregated feed guarantees, and what it does not
A production price feed is a set of independent reporters, an aggregation rule that discards outliers, and an update policy: publish when the price deviates past a threshold, or when a heartbeat elapses, whichever comes first. What that buys is real. One reporter cannot move the published value alone, and the value will not sit arbitrarily stale while the network operates normally.
What it does not buy you is the part integrators assume. The feed reports a summary of trading on venues you did not select, at a liquidity depth nobody checked on your behalf. If those venues can be moved for a few million dollars, an aggregated feed will faithfully and honestly report the moved price, and the aggregation will not flag anything, because nothing malfunctioned. The oracle secures transport and aggregation. It does not secure the market underneath, and that distinction is the whole term.
Manipulating the market the oracle honestly reports
Harvest Finance documented its own case. On 26 October 2020 attackers ran an economic attack on its fUSDC and fUSDT vaults and drained $24 million by repeatedly exploiting impermanent loss inside the Curve Y pool the vault's share accounting trusted for pricing.3 The pattern repeated at larger scale two years later. Solidus Labs reconstructed the Mango Markets exploit of 11 October 2022 from order book data: roughly $4 million of MNGO buying across three venues pushed the oracle-reported price up 2,300 percent, and $116 million was borrowed against the unrealised profit on the attacker's own position and withdrawn.5
TWAP raises the cost of this without removing it. Inverse Finance lost about $15.6 million on 2 April 2022 when an attacker swapped 500 ETH into a thin INV/WETH pair on SushiSwap, moving the price roughly fiftyfold, and the protocol's oracle path ended up using that pair's TWAP and returned the distorted number.6 The earliest widely studied case is older still: bZx's own post-mortem, published 17 February 2020 and now readable only through a web archive because the domain is gone, walks through a 10,000 ETH flash loan from dYdX used to distort a thinly traded pair that its margin logic depended on.4
When the feed itself is the failure
Not every oracle loss involves an attacker moving a market. Synthetix published its own response to a June 2019 incident in which an external foreign exchange feed delivered a rate far away from the true rate, the system accepted it without a deviation or sanity check, and a trading bot exploited the resulting mispricing before the team intervened.7 Nothing was manipulated. A data source was simply wrong, and the contract had no opinion about what a plausible price looked like.
Staleness is the other half of this category. rekt.news records $14.2 million lost by Venus in May 2022 when attackers exploited a stalled Chainlink feed during the LUNA collapse and borrowed against collateral the oracle had not yet repriced.8 A feed that stops updating does not throw an error. It keeps returning its last value, confidently, and a contract that does not check the timestamp will keep trading against it.
One figure here deserves a caution rather than a citation. The same rekt.news account puts Venus's 2021 XVS price manipulation at $95 million in bad debt.8 A figure of $200 million circulates widely for the same incident, and we have not found a Venus-authored post-mortem that settles which is right. Published figures disagree, so use the number with the source that carries it and treat the difference as open. Repeating a round number nobody can trace is how bad data gets laundered into diligence documents.
What to settle before you integrate a feed
Four questions, answered in writing, cover most of the exposure. Which venues form this price, and what does it cost to move them ten percent for one block and for thirty minutes. What is your contract's definition of stale, in seconds, and what does it do past that: revert, pause, or fall back. Who can change the oracle address on your deployed contracts, under what authorization, after what delay. And what deviation between two independent feeds is large enough that the protocol should stop rather than pick one.
Across the 100+ projects we have advised, the fourth question is the one with no answer most often, and the third is usually worse than the team believes. An upgradeable oracle address behind a single key is a total-loss capability with no delay attached. The feed is a dependency you inherited, not a guarantee you bought.
Common questions
What is the oracle problem?
The oracle problem is that blockchains cannot access external data, which leaves them isolated networks, similar to a computer with no internet connection.1 Bridging that gap requires an extra piece of infrastructure whose reports the chain cannot verify. Every oracle design is an attempt to make an unverifiable input trustworthy enough to build on, using redundancy, economic stake and aggregation rather than proof.
Is a TWAP oracle safe from manipulation?
No. A time-weighted average price raises the cost of manipulation because the attacker has to hold the distorted price across blocks rather than inside one transaction, but it does not remove the attack. Inverse Finance lost about $15.6 million in April 2022 when an attacker moved a thin SushiSwap pair roughly fiftyfold and the protocol's oracle path returned that pair's TWAP.6 TWAP also adds latency, which is its own risk during fast repricing.
What should a contract do if the oracle stops updating?
It should refuse to act on the value. A stalled feed keeps returning its last price without signalling an error, so the contract has to check the timestamp itself and define, in seconds, what counts as stale. Venus lost $14.2 million in May 2022 to borrowing against collateral a stalled feed had not repriced during the LUNA collapse.8 Reverting, pausing new borrows, or switching to a secondary feed are the usual responses.
How much have oracle manipulation attacks cost?
Individual incidents run from hundreds of thousands to over a hundred million dollars. Harvest Finance documented $24 million drained in October 2020.3 Solidus Labs reconstructed $116 million borrowed and withdrawn from Mango Markets in October 2022 after roughly $4 million of buying pushed the reported price up 2,300 percent.5 Aggregate totals should be treated carefully, because published figures for individual incidents sometimes disagree by a factor of two.
See Tokenomics Audit Services for how this applies in practice.
Sources
- The Blockchain Oracle Problem
Chainlink Education Hub, 2026
Definition of the oracle problem as the inability of blockchains to access external data, making them isolated networks. Read 3 August 2026. - Oracles (Uniswap v2 core concepts)
Uniswap Docs, 2026
The cumulative price accumulator underlying v2 TWAP construction, and the stated rationale of building manipulation-resistant feeds. Read 3 August 2026. - fUSDC/fUSDT Economic Attack Oct 26 2020
Harvest Finance (official documentation), 2020
Protocol's own incident record: $24 million drained at 02:53 UTC on 26 October 2020 by repeatedly exploiting impermanent loss inside the Curve Y pool the vault priced against. - Post-Mortem (bZx, ETHDenver flash loan attack), by Kyle J. Kistner
bZx / bZeroX LLC, via the Internet Archive Wayback Machine, 2020
First-party post-mortem published 17 February 2020 covering the 14 February 2020 attack, including the 10,000 ETH dYdX flash loan. Cited from the Wayback archive because the bzx.network domain no longer resolves. - The Mango Markets Exploit: An Order Book Analysis
Solidus Labs, 2022
Transaction-level reconstruction of the 11 October 2022 exploit: roughly $4 million of MNGO buying across three venues pushed the oracle-reported price up 2,300 percent, supporting $116 million of borrowing. - Inverse Finance, REKT
rekt.news, 2022
Account of the 2 April 2022 exploit, about $15.6 million, in which a 500 ETH swap moved a thin INV/WETH SushiSwap pair roughly fiftyfold and the oracle path returned that pair's TWAP. No Inverse-authored post-mortem was located. - Synthetix Response to Oracle Incident
Synthetix (official blog), 2019
Protocol's own response to the June 2019 incident in which an external foreign exchange feed delivered a wrong rate that the system accepted without a sanity check. - Venus Protocol, Rekt IV
rekt.news, 2025
Source of the $95 million bad-debt figure for the 2021 XVS price manipulation and the $14.2 million May 2022 stalled-oracle loss during the LUNA collapse. A figure of $200 million circulates elsewhere for the 2021 incident and is not corroborated by any protocol-authored document we could locate.
Last reviewed 2026-08
Know the terms but not sure how they apply to your project? That is what an engagement is for. We design, document, and stress-test the whole token economy inside the Tokenomics Data Room.
100+ projects advised. Complete tokenomics in 4 to 6 weeks.