EN

Inside an oracle

4 minDifficulty Checked 2026-11-10
Key takeaways
  • Each price is a whole number plus a scale that says where the decimal point goes.
  • One timestamp covers every pair. Pairs left out of an update lose their price.
  • An oracle costs one owner reserve for up to five pairs, two for six to ten.

Open an oracle and you find a short list of pairs. Each pair has two names and a price.

The pair. A pair such as BTC/USD has a base asset and a quote asset. The price says how much of the quote asset one unit of the base asset costs. So BTC/USD is the price of one BTC in USD.

The names do not have to be tokens on the XRP Ledger. They can be a stock symbol or a bond code. The oracle describes outside markets.

The price. The ledger stores prices as whole numbers. A second number, the scale, says where the decimal point belongs. A stored 155000 with scale 6 means 0.155.

The clock. An oracle has one timestamp for the whole list. Every update must carry a time close to the current ledger time. An old price cannot be posted as if it were new.

That single timestamp has a side effect. If an update skips a pair, the ledger wipes that pair's price. The pair stays on the list with no number. This is on purpose: a missing price is safer than a stale one that looks current.

The cost. An oracle is an item its owner keeps on the ledger, so it locks a reserve. Up to five pairs lock 0.2 XRP. Six to ten pairs lock 0.4 XRP. Deleting the oracle frees it.

Check yourself3 questions
1. An oracle stores AssetPrice 155000 with Scale 6. What is the price?
2. An update includes BTC/USD but leaves out an existing ETH/USD pair. What happens to ETH/USD?
3. How much XRP does an oracle with seven pairs lock?
Sources
Next lessonReading and combining prices3 min