
Blockchain Oracles Explained: How Data Gets On-Chain
Blockchain oracles feed real-world data to smart contracts. Here is how push and pull feeds, aggregation and staleness checks work in practice today.
The Problem Every Smart Contract Has
A blockchain is deliberately sealed off from the world. Every node has to reach the same answer when it replays a transaction, which means a contract cannot call an external website — two nodes running the same code a second apart would get different responses and the chain would fall apart. That determinism is the whole point, and it is also the whole problem, because most useful contracts need to know something the chain does not contain: a price, a temperature, a match result, whether a shipment arrived.
An oracle is the bridge. It is the mechanism by which off-chain information gets written on-chain in a form every node can agree on. This guide covers how that actually works, what the design trade-offs are, and what to check before you trust one.
Quick Picks
- For most DeFi price data: a decentralised push-based aggregated feed is the default, and the one auditors expect to see
- For high-frequency or long-tail assets: a pull-based feed where the consumer submits a signed report on demand costs less and updates faster
- For verifiable randomness: never use block hashes or timestamps, use a dedicated commit-reveal randomness service
- For anything settling real money: always implement a staleness check and a circuit breaker, regardless of provider
What Is a Blockchain Oracle, Exactly?
An oracle has two halves. Off-chain, one or more nodes fetch data from sources — exchange APIs, weather services, government statistics, sports feeds. On-chain, a contract receives that data, applies whatever validation rules it has, and stores the result where other contracts can read it.
The naive version is one server with one key writing values to one contract. That works, and it reintroduces exactly the trust assumption the blockchain was built to remove. Whoever holds that key can write any number they like, and every contract downstream will believe it. This is why oracle design is mostly a study in removing single points of failure.
Push Feeds vs Pull Feeds
Two dominant architectures exist, and they solve different problems.
Push feeds work on a schedule and a threshold. A network of independent node operators each fetch a price, the values are aggregated, and the result is written on-chain whenever either the price moves past a deviation threshold — say 0.5% — or a heartbeat interval expires, often an hour. Contracts just read the stored value. Reading is cheap; the network absorbs the cost of the updates.
Pull feeds invert this. Data is signed off-chain and made continuously available, but nothing hits the chain until a consumer wants it. The consumer fetches a signed report, submits it as part of their own transaction, and the on-chain verifier checks the signatures. The consumer pays the gas, which means the model scales to thousands of assets and sub-second updates without the network funding constant writes for feeds nobody reads.
Rough guidance: push feeds suit blue-chip assets read by many protocols, where the update cost is amortised across everyone. Pull feeds suit long-tail assets, high-frequency strategies, and any application that would rather pay per use than subsidise a permanent feed.
How Aggregation Protects the Value
The security of a good oracle rests on aggregation, and the details matter more than most integrators check.
Start with source diversity. A feed drawing from ten exchanges is only as good as the independence of those exchanges — if eight of them get their price from the same underlying venue, you have one source wearing eight hats. Volume weighting helps, since a thin market is easier to move than a deep one.
Then node diversity. Independent operators running independent infrastructure means no single compromise, outage or jurisdiction takes the feed down. Networks typically require a quorum of signatures before a value is accepted on-chain.
Finally, the aggregation function itself. A median is far more robust than a mean because a single wild value cannot drag the result far; a mean of ten values where one is zero is catastrophically wrong, a median of the same set is fine. Most production feeds use a median or a trimmed mean for this reason.
What Can Go Wrong With an Oracle?
The failure modes are well documented, and nearly all of them have shown up in practice at some point.
Stale data. The feed stops updating — a node outage, a source going offline, a chain congestion event — and the contract keeps happily reading a price from four hours ago. This is the single most common integration bug, and the fix is one line: check the timestamp on every read and revert if it exceeds your tolerance.
Thin-market manipulation. If an asset's price is set by a market with shallow liquidity, an attacker can move that market cheaply and profit from a much larger position on-chain. The defence is not on the oracle's side; it is choosing not to accept thin-market assets as collateral in the first place.
Single-block spot reads. Reading a decentralised exchange's spot price directly within one transaction is trivially manipulable by a flash loan. Time-weighted average prices help, and a proper oracle feed helps more.
Precision and decimals. Feeds report with a fixed number of decimals that varies by asset and by network. Mixing an 8-decimal feed with an 18-decimal token in the same calculation is a real and recurring source of loss.
Governance risk. Someone can upgrade the feed contract, change the node set, or adjust parameters. Knowing who, under what process, and with what delay is part of your risk assessment.
Which Oracle Should You Use?
There is no single right answer, but there is a useful decision order.
Ask first what happens if the value is wrong. If a bad number costs a leaderboard position, your requirements are loose. If it liquidates positions or releases funds, you need decentralised aggregation, a staleness check, and a circuit breaker that halts the protocol rather than acting on an implausible value.
Ask second how often you need updates. Hourly heartbeats are fine for slow-moving collateral. Derivatives need sub-second, which points at pull feeds.
Ask third what the feed costs and who pays. Push feeds are cheap to read and expensive to maintain; someone funds that, and if the funding stops, the feed stops. Pull feeds put the cost on the caller, which is more honest but shows up in your gas budget.
Ask fourth whether the data has a canonical source. Some data has one authoritative publisher — official statistics, a specific exchange's settlement price — and the oracle's job is faithful transport rather than aggregation across disagreeing sources. Those are different security models, and conflating them is a common mistake.
Beyond Price Feeds
Prices dominate the conversation, but the category is wider.
Verifiable randomness matters for anything involving lotteries, minting order, or game outcomes. Block hashes and timestamps are influenceable by whoever produces the block, so they are not acceptable sources. Dedicated randomness services use a commit-reveal scheme with a cryptographic proof that the value was generated fairly and could not have been chosen after the fact.
Proof of reserve feeds attest that off-chain assets backing an on-chain token actually exist, publishing an attested balance on a schedule. These have become standard infrastructure for asset-backed tokens — the mechanism sits underneath much of the bank-issued stablecoin activity that has defined the market this year.
Cross-chain messaging is oracle machinery in a different hat. Reporting that an event happened on chain A so a contract on chain B can act is structurally the same problem: independent observers attesting to something the receiving chain cannot verify itself. Chainlink's Project Pangea cross-border settlement work is built on exactly that primitive.
Event and identity attestation covers everything else — shipment delivery, insurance triggers, credential checks. The pattern is constant: an off-chain fact, a set of independent attesters, an on-chain verification step.
An Integration Checklist
If you are wiring a feed into a contract, these are the checks that catch most real problems:
- Read the timestamp on every fetch and revert on data older than your tolerance
- Reject zero, negative and implausible values outright rather than acting on them
- Confirm the decimal precision of the specific feed on the specific network you deploy to
- Implement a circuit breaker that pauses rather than proceeds when a value looks wrong
- Check the deviation threshold and heartbeat against how fast your positions can move
- Understand who can upgrade the feed and on what timelock
- Test against a mock oracle that returns stale, zero and extreme values, and confirm your contract survives all three
The Short Version
Oracles are the seam between a deterministic system and a messy world, and seams are where things tear. The good news is that the failure modes are well understood and the defences are cheap — a staleness check costs one comparison, and it prevents the most common way integrations lose money.
Choose an architecture that matches your update needs, verify the aggregation is genuinely diverse at both the source and node level, and write your contract as though the feed will eventually return something wrong. Because at some point, it will. More on the infrastructure underneath these markets in our crypto coverage.
Sources: Chainlink Documentation — Data Feeds — accessed September 3, 2026; Ethereum.org — Oracles — accessed September 3, 2026.
More Crypto Stories

SoFi and Kraken Connect 24/7 Dollar Settlement Rails
SoFi and Kraken owner Payward linked SEN to Kraken Prime, adding 24/7 dollar settlement and a SoFiUSD listing for institutional clients on both networks.

SEC Transfer Agent Rules Get First Update in 45 Years
The SEC proposed its first transfer agent overhaul since the early 1980s, inviting comment on blockchain recordkeeping and tokenized securities.

21 Global Banks Form a Joint Dollar Stablecoin Venture
Citi, Goldman Sachs, BofA and 18 other institutions will form a company in H2 2026 to issue a regulated dollar stablecoin, launching in H1 2027.
