A blockchain can only see what is already on it. Every price, weather reading, election result, and proof of reserves lives outside, and a contract that needs one has to be told — accurately, and in a way that an attacker cannot manipulate. That gap is the oracle problem, and it is responsible for a large share of the largest DeFi exploits, not because oracles are badly built but because the trust model is usually invisible in the integration.
Push versus pull
Two architectures dominate, and they fail differently.
Push oracles publish a value to the chain on a schedule, updating when a deviation threshold is breached or a heartbeat interval elapses. Chainlink's data feeds work this way: a decentralised network of independent node operators reports a price, the network takes a median, and the result is written on-chain where any contract can read it for free. Consumers get latency bounded by the heartbeat and cost borne by the protocol.
Pull oracles publish nothing until someone needs it. Pyth is the reference design: price data is signed off-chain by a set of publishers, and the consumer fetches the update and submits it as part of its own transaction, paying for the verification but getting the freshest possible value. Because each update carries a confidence interval and a publish time, the consumer can reject stale or low-confidence data on the spot.
The trade is straightforward. Push is simpler and free at the point of use; pull is fresher and lets the consumer define what "fresh enough" means, at the cost of added complexity in every call site.
Where manipulation actually happens
Four vectors account for nearly all oracle-driven losses.
Thin liquidity. Reading a spot price from a pool that a flash loan can move, or from the smallest venue in a fragmented market. The classic attack: borrow, skew the pool, read the price, act, unwind. Using a time-weighted average (TWAP) over a meaningful window raises the cost enormously, because the attacker has to hold the price across many blocks.
Latency. Any feed whose update cadence exceeds the duration of an attack is a feed an attacker can trade against. A 24-hour heartbeat on a volatile pair is a full day of free information.
Stale data. An oracle that stops updating — because of a network outage, a funding lapse, or a misconfiguration — leaves the last known price in place indefinitely. Contracts that do not check the timestamp will happily act on a week-old number.
Single-source dependence. A feed of one is not a feed. Whether the single source is a centralised API or one exchange's order book, it reintroduces exactly the counterparty the blockchain was supposed to remove.
Randomness is a different problem with the same shape
A blockchain has no entropy: every node executes the same code against the same inputs, so any value derived from block data is public before it is used, and therefore gameable by whoever sees it first.
A verifiable random function fixes that. It takes a private key plus a public seed and produces an output that anyone can verify was computed from those inputs, while staying unpredictable until the publisher commits it. Chainlink VRF charges LINK to fulfil a request in a later block, which imposes a commit-reveal structure: the requester cannot inspect the result and re-roll.
It matters wherever an unpredictable outcome decides who gets what — NFT mints with a random reveal, validator and committee selection, loot drops, lottery settlement. The property that counts is that randomness is committed before the outcome is known, not that the number is random in the abstract. A protocol reading blockhash directly has no such guarantee, since a validator can influence the hash it produces.
What to check before integrating
Read the update mechanism, not the brand. What is the heartbeat, what is the deviation threshold, and how many independent operators feed the median? Does the feed expose a timestamp and a confidence bound, and does your contract check them, or does it treat the answer as perpetually valid? What happens during an outage — does the feed revert, freeze, or return a stale value?
Then ask the question that matters most for your protocol: what does the system do if the oracle is wrong rather than absent? A lending market can survive a feed reverting. It cannot survive a feed that confidently reports a wrong price, which is why caps, isolated markets, and circuit breakers around anything oracle-dependent are not belt-and-braces but the actual risk control.
References
Next, read Automation On-Chain 101. More in Infrastructure & Scaling.