Skip to the lesson
Back to the library
Lesson 613Digital assets4 min readLast reviewed 28 November 2026

More digital assets lessonsAll lessons

BRIDGES TO REAL-WORLD DATA

Crypto oracles: how blockchains get information from the outside world.

Why smart contracts cannot see off-chain data on their own, how oracles deliver prices and other information, the difference between centralised and decentralised oracles, famous oracle failures and manipulation attacks, and what users should watch for.

See the example
Crypto oracles: how blockchains get information from the outside world. — photo illustration
613 / BRIDGES TO REAL-WORLD DATAPhoto illustration
01

The idea

A blockchain is a closed system. Smart contracts can read data stored on the chain, but they cannot directly access prices, weather, sports results or other information from the outside world. An oracle is a service that brings external data onto the blockchain so contracts can use it.

At a glance
How an oracle feeds a smart contract — infographic
02

Why oracles matter

Decentralised finance relies heavily on price data. Lending protocols need prices to decide when loans are under-collateralised and should be liquidated. Derivatives and stablecoins need reference prices. If the price feed is wrong, users can be liquidated unfairly or attackers can drain funds.

03

Types of oracle

TypeHow it worksTrade-off
Centralised oracleOne provider publishes dataSimple, but a single point of failure
Decentralised oracle networkMany nodes report, results aggregatedMore resilient, more complex
On-chain price oracleUses prices from a decentralised exchangeCan be manipulated if liquidity is thin
Time-weighted average priceAverages prices over a periodHarder to manipulate, slower to update
04

Decentralised oracle networks

Networks such as Chainlink use many independent node operators that fetch data from several sources and combine it into a single value published on-chain. Aggregating reduces the risk of one bad source or operator. Nodes may be paid in tokens and penalised or replaced for poor performance.

05

The oracle problem

A blockchain can be highly secure, but a contract is only as reliable as its inputs. This is called the oracle problem: trusting external data reintroduces a point of trust into an otherwise trust-minimised system.

06

Manipulation attacks

Several DeFi exploits have involved manipulating prices that protocols relied on. Attackers used flash loans, borrowing large sums within a single transaction, to move prices on thinly traded pools, then borrowed against inflated collateral or triggered favourable trades. The Mango Markets exploit in 2022 involved manipulating a token’s price to borrow over 100 million dollars from the platform.

07

Defences

Protocols reduce risk by using multiple data sources, time-weighted averages, circuit breakers that pause activity on extreme moves, limits on how much can be borrowed against illiquid tokens, and oracle networks with many independent nodes.

08

Beyond prices

Oracles can also deliver random numbers for games, proof of reserves for stablecoins and tokenised assets, weather data for insurance contracts, and cross-chain messages. As tokenisation of real-world assets grows, reliable data links become more important.

09

What users should check

Ask yourself
  • Which oracle does the protocol use?
  • How many data sources and nodes feed it?
  • How often are prices updated?
  • Are there safeguards for extreme moves?
  • Has the protocol been exploited before?
10

The Gulf angle

UAE regulators, including Dubai’s Virtual Assets Regulatory Authority and the Abu Dhabi Global Market’s Financial Services Regulatory Authority, oversee licensed virtual asset activities. Users interacting directly with unlicensed DeFi protocols bear technology risks such as oracle failures themselves, without the protections that licensed services must provide.

11

Stale data and outages

Manipulation is not the only danger. If an oracle stops updating during a fast market, contracts may keep using an old price. Liquidations can then happen too late, leaving bad debt, or at the wrong time. Network congestion can delay updates exactly when markets are most volatile. Some protocols add heartbeat checks that pause borrowing if a price has not updated within a set time, and many publish dashboards showing oracle status. Users relying on DeFi for large sums often check how a protocol behaved during past market crashes before committing money.

12

A realistic scenario

A lending protocol uses the price of a small token from a single exchange pool. An attacker borrows a large sum through a flash loan, pushes the pool price up tenfold, deposits the token as collateral and borrows stablecoins against it, then leaves the protocol with bad debt when the price falls back.

13

Questions to ask yourself

Ask yourself
  • Where does this contract get its data?
  • Could someone manipulate that data cheaply?
  • What happens if the oracle stops updating?
  • Are illiquid tokens accepted as collateral?
  • Do I understand the risks of using this protocol?
14

The short version

Oracles bring external data such as prices onto blockchains. Smart contracts depend on them, so bad or manipulated data can cause losses. Decentralised oracle networks, averaging and safeguards reduce the risk, but do not remove it.

Worked example

Illustration: if a protocol accepts a token as collateral at a manipulated price of 10 instead of its real 1, an attacker depositing 1 million tokens could borrow against 10 million of apparent value, leaving bad debt. Hypothetical figures.

The idea to take with you

Blockchains cannot read the outside world by themselves. Oracles feed in prices and data, and if that data is wrong or manipulated, smart contracts can act on bad information.

Sources & assumptions

Primary educational references

Bank for International Settlements · DeFi risks and the decentralisation illusion ↗

Ethereum.org · Oracles ↗

Reviewed November 28, 2026. Examples are hypothetical illustrations. Educational content, not personalised investment, legal or tax advice.