Where the Price Comes From

We just watched Maya trade at a firm price and her eTSLA appear - but that price had to come from somewhere honest before anyone would commit to it. Let's meet the part of the system that decides what Tesla is worth: the Oracle.

The problem with "just check a website"

Maya's eTSLA is supposed to track the real Tesla share price. So the protocol needs to know that price - constantly, and in a way it can trust.

The naive answer is "look it up." But which website? What if it's down? What if it's lagging by a minute, or shows a glitchy number for a second, or simply lies? A protocol that holds real collateral can't stake its solvency on one feed it can't verify. If the price is wrong, every trade, every safety check, and every payout built on it is wrong too.

So Own treats the price like evidence. It needs to be fresh (reflecting now, not five minutes ago), agreed-upon (not one source's opinion), and tamper-proof (provably untouched between the price-teller and the contract). The Oracle is the robot that produces exactly that.

Step one: gather many opinions

The Oracle doesn't ask one source. For a stock like Tesla it pulls quotes from several independent price sources at the same time - data providers like Twelve Data, Finnhub, Pyth, and Yahoo Finance. (For crypto assets it uses crypto-native sources like CoinGecko and Pyth instead.)

Each source is queried in isolation. If one is slow, broken, or returns nothing, it simply contributes nothing - it never drags the whole cycle down. The Oracle would rather hear from three good sources than wait on one bad one. Prices quoted in other currencies (a Korean or Japanese listing, say) get converted to US dollars first, so everything is comparing apples to apples.

Step two: throw out the bad ones, agree on the rest

Now the Oracle has a handful of numbers. Its job is to boil them down to one it would stake the protocol on. This is the aggregator - and it's deliberately suspicious.

First it drops anything stale. While the market is open, a quote that's too old (or carries no timestamp at all) is thrown out - a frozen price from hours ago must never masquerade as a live one.

Then it looks for agreement. With three or more fresh quotes it takes the median - the middle value - and keeps only the sources clustered near it. The median is the trick that makes a single liar harmless: one source printing a wildly wrong number sits at the edge, gets ignored, and never moves the result.

   Twelve Data  $248.10  ┐
   Finnhub      $248.05  ├─► drop stale ─► cluster near median ─► ONE price
   Pyth         $248.20  │                                        $248.10
   (bad feed)   $311.00  ┘   (outlier - falls outside, ignored)

If the sources can't agree - they scatter, or too few are fresh - the Oracle does something important: it withholds. It refuses to produce a new price rather than publish a guess. The last good price keeps being served but is openly marked stale, so everyone downstream knows not to lean on it.

There's one last gate even after agreement: an absurdity check. If the new price is more than 5x or less than a fifth of the last trusted one, it's rejected outright. That catches the rare bug that fools every source at once - a decimals slip, say - which a median alone couldn't.

Step three: stamp it so the contracts can trust it

Now the Oracle has one number it's confident in. But how does a contract on the blockchain know this number really came from the Oracle and wasn't altered in transit by whoever relayed it?

The Oracle puts a signed price on it: a cryptographic stamp, made with a private key only the Oracle holds, that seals the asset, the price, and the exact moment together. Anyone can check the stamp; nobody can forge it or tamper with the number underneath without breaking it. The contract doesn't have to trust the messenger or any website - it just checks the stamp.

The stamp is also bound to this protocol on this chain, so a price signed for Own can't be lifted and replayed somewhere else. And the Oracle has a strict rule: it never re-stamps a stale price. If it can't produce a genuinely fresh one, it produces nothing.

Where the signed price goes

That stamped price feeds two things you've already met. The Market Maker reads the Oracle's mid price to build the firm quote it offered Maya in Chapter 4. And the contracts use it as their mark - the working price for safety checks - kept current on-chain by the Keeper, the robot we'll meet in Part 4.

The Oracle, importantly, holds no power of its own. It can't move money or touch a vault. All it does is tell the truth about price, provably. Everything else is built to check it.

What just happened

  • The Oracle gathers Tesla's price from several independent sources at once, in dollars, with any dead source quietly ignored.
  • It throws out stale quotes, takes the median of what's left, and keeps only the sources that agree - so one bad feed can't poison the result.
  • If the sources don't agree, it withholds rather than publish a guess, and an absurdity check blocks any price that's wildly off the last good one.
  • It puts a tamper-proof signed stamp on the final price, bound to this protocol and chain, so contracts trust the number without trusting any website.
  • That signed price becomes the Market Maker's quote basis and the contracts' mark - never re-stamped while stale.

results matching ""

    No results matching ""