EN

Prices on the ledger

4 minDifficulty Checked 2026-11-10
Key takeaways
  • A blockchain cannot look up outside data. An oracle brings it on-ledger.
  • On the XRPL, an oracle is a ledger entry owned by one account.
  • Only the owner can change an oracle. Readers have to trust that owner.

The XRP Ledger knows what happens on the XRP Ledger. It knows every balance and every trade on its own exchange. It does not know the price of gold, a stock or a currency in the outside world. It has no way to go and look.

Many financial apps need those outside prices. A lending app has to value what it holds. A stablecoin tool has to know an exchange rate.

An oracle fixes this. Picture a scoreboard at a stadium. The game happens on the field. Someone with a view of the field writes the score on the board, and everyone in the stadium reads it from there.

On the XRP Ledger:

  • The field is the outside market.
  • The scorekeeper is an account that publishes prices. It is run by whoever publishes the data.
  • The scoreboard is a ledger entry called an Oracle. It holds prices for up to 10 pairs, such as BTC/USD.

Anyone can read the scoreboard. Only the scorekeeper can write on it.

That is the catch. The ledger does not check whether a posted price is true. It stores what the owner submits. If the scorekeeper is wrong, late or dishonest, the board is wrong.

Careful apps do two things. They choose oracles run by publishers they trust. They read several oracles and combine the answers, so one bad number has less effect.

The feature is live on mainnet. It was added by the PriceOracle amendment.

Check yourself3 questions
1. Why does a ledger need an oracle for a stock price?
2. Who can update a given price oracle?
3. How do apps lower the risk of one wrong price?
Sources
Next lessonInside an oracle4 min