Oracles
Bridging chains to real-world data.
A blockchain cannot, on its own, know a market price or a sports result. Oracles (like Chainlink) feed such external data to smart contracts in a decentralised, verifiable way.
They are essential to DeFi (asset prices, liquidations) but are a sensitive point: a corrupted feed can be exploited - ‘oracle risk’.
- External data → contracts
- Critical for DeFi
- Oracle risk
A manipulated price source
Seven sources report the ETH price. One is manipulated and reports $2,400.
- 01Simple average$2,914.71
- 02Median$3,000
- 03Gap between average and true price2.84 %
The median ignores the outlier, the average does not: a 2.8% artificial drop is enough to liquidate positions. A pro checks how the oracle aggregates and how many sources would need corrupting.
Questions and answers
Why are oracles a target?
If an attacker distorts the price they report, they can over-borrow or trigger liquidations for profit.
How does an oracle protect itself?
By aggregating many sources and many independent nodes, and smoothing prices over time.
Test your understanding with a quick interactive quiz.