Group 4 · The wider trail

Oracles (bringing outside facts on-chain)

news from outside

The idea

An posts off-chain facts (prices, weather, scores) onto a blockchain so smart contracts can use them. Bad oracle data → bad automatic payouts.

Why it matters

The chain cannot see the real world by itself. If a contract liquidates on a bad price feed, “the code worked.”

How it works

Blockchains are sealed off on purpose. Every node must get the same answer from the same data, so a contract cannot just check a website for today’s price. Different nodes might see different pages at different moments. Instead, an oracle posts the fact on the chain as a transaction, and then every node reads the same value.

A typical oracle setup works like this. Several independent providers fetch the price from their sources. Each signs its report. The system combines them, often by taking a middle value so one wild report has little effect, and publishes the result on the chain. Contracts then read that posted value to settle a bet, repay a loan, or trigger a liquidation.

Real example: the XRP Ledger has a built-in price oracle feature. A provider can publish price data on the ledger and update it, and applications can combine several providers’ entries into one figure. The ledger records what was posted; it does not check whether the price was right. Source: Price Oracles.

Oracle feeds a price

Providers fetch, sign, combine, and post a price so contracts read one shared value.

  1. Providers fetch
  2. Each signs
  3. Combine
  4. Contracts read

Step 1Several independent providers fetch the price from their sources.

Read all steps
  1. Providers fetch: Several independent providers fetch the price from their sources.
  2. Each signs: Each signs its report.
  3. Combine: The system combines them, often by taking a middle value so one wild report has little effect, and publishes the result on the chain.
  4. Contracts read: Contracts then read that posted value to settle a bet, repay a loan, or trigger a liquidation.

Picture it

Messenger carrying the wheat price into the courthouse = .

Watch out

Protocols that hang on a single price feed with no backup.