Yesterday in crypto, explained

What Is a Blockchain Oracle?

Deck: Smart contracts can't look anything up on their own. Oracles are how prices, results and other outside facts get onto a blockchain, and that hand-off is one of the weakest links in crypto.

Last reviewed: October 24, 2026

If you've read that smart contracts "run on their own," you may have had the same question I did. If a lending app sells off collateral when a price drops, where does the contract get the price? A blockchain doesn't have a news feed.

The answer is an oracle. The word sounds mystical, but the idea is plain: something has to carry outside information onto the chain. This guide explains how that works, the two main designs, and why so many problems in decentralized finance trace back to this one step.


The short version

  • An oracle brings outside data onto a blockchain so smart contracts can use it. ethereum.org: oracles "make offchain data sources available to the blockchain for smart contracts."
  • Contracts can't fetch it themselves. By default they can only see data already on the chain.
  • The most common use is prices, for example for loans backed by crypto collateral. Others include randomness, event results and triggering contracts on a schedule.
  • Centralized oracles rely on one operator. Decentralized oracles combine many nodes and sources, which helps but adds cost and complexity.
  • If the oracle is wrong, the contract is wrong. A smart contract acts on whatever number it's given, which is why oracles are a favorite target for attackers.

Why smart contracts can't just look things up

A blockchain works because thousands of computers, called nodes, all agree on the same result. Every node replays every transaction and has to land in exactly the same place.

That's a problem for outside data. ethereum.org gives a simple example: if a contract asked the internet for a value and one node got "3" while another got "7," the network couldn't agree on what happened. So blockchains don't allow it. In ethereum.org's words, "Ethereum-based smart contracts cannot, by default, access information stored outside the blockchain network," and "without an oracle, a smart contract would be limited entirely to onchain data."

Two panels. Inside the blockchain, a contract can check balances, signatures, its own stored data and other contracts. Outside, it can't see market prices, weather, election or sports results, or whether a shipment arrived. An oracle sits between them and carries data in.
A contract can check what's on the chain, and nothing else, unless an oracle brings it in. Diagram: Fueled Crypto.

The oracle's job is to fetch the outside fact, agree on its value and post it on-chain as a normal transaction. Once it's there, every node sees the same number and contracts can use it.


How an oracle gets a price on-chain

Here's a simplified version of what a price oracle does:

  1. Collect. It pulls the price of an asset from several outside sources, such as trading venues or data providers.
  2. Agree. Independent nodes compare what they found and settle on one value, often a middle value, so one odd number doesn't decide everything.
  3. Post. The agreed price is written to an oracle smart contract on the blockchain.
  4. Read. Other contracts, like a lending app, read the latest price from that oracle contract.
One glitchy source barely moves the middle value. Asset X and the prices are made up. Animation: Fueled Crypto.

Real systems add more rules, such as how often to update, what happens when sources disagree a lot, and how nodes are paid or penalized. ethereum.org sums up what a good oracle needs as correctness (no bad data), availability (data when it's needed) and incentives that reward honest behavior.


What oracles are used for

ethereum.org lists several common jobs:

  • Prices. Lending apps use them to decide whether a loan's collateral still covers it. Trading apps use them to settle positions. Many stablecoin designs depend on them too.
  • Randomness. Blockchains can't produce truly unpredictable numbers on their own, so games and lotteries use oracles for verifiable randomness.
  • Event results. Prediction markets and insurance-style contracts need to know what happened in the real world, like a vote, a game or the weather.
  • Automation. Contracts don't run by themselves; something has to trigger them. Some oracle services call a contract when a condition is met or on a schedule.
  • Sending data out. Some oracles work in the other direction and let a contract trigger something off-chain.

If you've read about tokenized real-world assets, the same question applies there: something has to tell the chain what's happening to the real asset.


Centralized vs. decentralized oracles

Two panels. A centralized oracle has one operator feeding a contract: simple and efficient, but a single point of failure, and you trust that one operator. A decentralized oracle has many nodes feeding a contract: one bad source or node matters less, but it's more complex and costly, and still only as good as its sources and incentives.
Both designs have trade-offs. No real project shown. Diagram: Fueled Crypto.

A centralized oracle is one operator that collects data and posts it. It's simple and efficient. The trouble is that everything rests on that one operator. ethereum.org is blunt: "Even 'reputable' providers can go rogue or get hacked. If the oracle becomes corrupt, smart contracts will execute based on bad data."

A decentralized oracle uses "multiple participants in a peer-to-peer network that form consensus on offchain data," as ethereum.org puts it. If one node or one source is wrong, the others can outvote it.

Decentralization helps, but it isn't a cure. ethereum.org notes that "decentralization among oracles is on a spectrum," and that "a network of oracle nodes serving information retrieved from the same source will run into the same problem as a centralized oracle." Many nodes repeating one bad source is still one bad source.

The Bank for International Settlements (BIS), a body owned by central banks, frames the bigger tension. Pushing for full decentralization makes oracles more complex and slower. Adding some centralization "might boost efficiency," but "it also means adding trusted parties to a system designed to be trustless."


Why oracles are a weak point

The core issue fits in one line from ethereum.org: "Data from an oracle must be correct for a smart contract to execute correctly." The contract can't double-check. It doesn't know the price is wrong; it just acts.

A made-up loan. Lee has 1 Asset X as collateral and borrowed 1,200 dollars, and the app can sell the collateral if it's worth less than 1,500 dollars. On a normal day the real price and oracle price are both 2,000 dollars and the loan stays open. When the feed is pushed off for a moment, the real price is still 2,000 dollars but the oracle reports 1,400 dollars, and the contract liquidates Lee's collateral.
The market didn't move, but the number the contract saw did. Lee, Asset X and the rule are made up. Diagram: Fueled Crypto.

This isn't only a theory. According to the BIS:

  • In one of the largest cases, in 2020, someone briefly pushed up the price of a stablecoin as the oracle saw it, which led to the liquidation of around $89 million in loans on a lending platform.
  • In 2022, decentralized finance apps "lost $403.2 million in 41 separate oracle manipulation attacks," a figure the BIS cites from the blockchain analytics firm Chainalysis.

A common pattern, as Chainalysis describes it, is to move the price of a thinly traded token with a burst of buying, often using borrowed money, and then use that briefly inflated price before it snaps back. The oracle reports a "real" trade price, but the market behind it was tiny or distorted.

When something goes wrong, sorting it out can be hard. The BIS notes there is "little clarity on legal recourse if a smart contract were triggered by false information."

What this means for a beginner: when you read about a DeFi app, it's fair to ask where its prices come from, how many sources it uses and what happens if a price looks off. A project's documentation or whitepaper should say. If it doesn't, that's worth noticing. None of this is a judgment of any particular project; it's simply part of understanding what you're relying on.


Common mix-ups

"An oracle predicts the future." No. The name is borrowed from ancient oracles, but a blockchain oracle reports facts that already exist, like a current price.

"Oracles are part of the blockchain." Not really. The oracle contract lives on-chain, but the data and often the operators are outside it. The BIS points out that oracles aren't part of a blockchain's own decentralized governance.

"Decentralized means it can't be wrong." Many nodes reading the same bad source will agree on the same bad number.

"The blockchain checks that the data is true." It only checks that the transaction posting it is valid. Whether the number matches reality is up to the oracle.

"Oracle problems only hit big traders." Anyone using an app that relies on a price feed, such as a crypto-backed loan, depends on that feed being right.


Words you'll keep hearing

  • Oracle: a service that brings outside (off-chain) data onto a blockchain for smart contracts.
  • On-chain / off-chain: recorded on the blockchain vs. anywhere else.
  • Price feed: an oracle contract that holds the latest price of an asset.
  • Node: a computer taking part in a network; oracle networks have their own nodes.
  • Oracle manipulation: pushing an oracle's reported value away from reality to profit from contracts that use it.
  • Liquidation: when a lending app sells a borrower's collateral because it no longer covers the loan.
  • Collateral: crypto locked up to back a loan.
  • The oracle problem: the challenge of getting trustworthy outside data into a system designed not to need trust.

More terms are in our crypto glossary.


Frequently asked questions

What is a blockchain oracle in simple terms? It's a service that takes information from the outside world, like a price, and posts it on a blockchain so smart contracts can use it.

Why can't a smart contract just check a website? Every node has to reach the same result. If nodes fetched outside data themselves, they could get different answers and couldn't agree, so blockchains only let contracts use on-chain data.

What are oracles mostly used for? Prices are the biggest use, especially for crypto-backed loans and trading. Others include random numbers, event results, automation and sending data out to off-chain systems.

What's the difference between a centralized and a decentralized oracle? A centralized oracle relies on one operator. A decentralized oracle combines data from many independent nodes. The second spreads out the risk but is more complex and costly, and it can still fail if everyone uses the same bad source.

What is oracle manipulation? It's when someone pushes an oracle's reported value away from reality, often by briefly moving a thinly traded market, and then profits from contracts that act on the wrong number.

Can an oracle be wrong without anyone attacking it? Yes. A source can glitch, an operator can go offline, or a feed can lag behind a fast-moving market. Contracts act on the number either way.

How do I know which oracle an app uses? Look at the app's own documentation or whitepaper. Many explain their price sources and safeguards. If an app doesn't explain it, that's useful to know.


Where to go next


Sources

All diagrams and animations are original Fueled Crypto graphics. Lee, Asset X and all prices are made-up examples.


Fueled Crypto publishes news and education, not investment, tax, or legal advice. Crypto assets are volatile and can lose value. Do your own research and consider a licensed professional before making financial decisions. See our full disclaimer.

Want plain-English crypto news once a week? Subscribe to Fueled Crypto.


Educational only. Not financial, investment, tax, or legal advice. Do your own research. Read the full disclaimer.