Skip to main content
A blockchain cannot see outside itself. A smart contract can read its own state and other contracts’ state, and nothing else — not an exchange price, not an interest rate, not the weather. Every node must reach the same result from the same inputs, so anything that could differ between nodes is off limits. An oracle is the bridge. It is a contract that holds external data, updated by parties who observe the outside world and publish what they see. Everything that needs a price — lending liquidations, perp margin, stablecoin pegs, RWA valuations — depends on one.

Why this is the hard part

An oracle is the point where a trust-minimized system takes an input on trust. Its data determines who gets liquidated and at what price, so it is the highest-value target in DeFi. Most large DeFi exploits have been oracle problems rather than contract bugs. The archetype: an attacker moves the price on a thin market the oracle reads, borrows against the manipulated valuation, and leaves with the difference. Nothing in the lending contract malfunctioned — it was correctly told the wrong price. That is why oracle design is mostly about making manipulation expensive:

The main designs

A perp venue’s index price is an oracle output; its mark price is not. Mark is derived from the venue’s own order book with a bounded premium to the index. Using mark as a spot reference will show you the venue’s basis, not the market price. See Perpetuals.

How Allium prices assets

Allium is not an oracle — nothing onchain reads from us, and we do not publish a feed contracts consume. We build price data for analysis, which frees us from the constraints an onchain oracle works under: we can look across every venue at once, revise a price when better information arrives, and be right retrospectively rather than only in the moment.
A long-tail token’s price is only as meaningful as the liquidity behind it. A token whose entire market is one shallow pool can print a price from a few dollars of volume, and that price is real in the sense that a trade happened at it, and unusable as a valuation. Check the pool depth and trade volume alongside the price before you value a position with it.

Next steps

  • Prices — the full price data vertical
  • AMMs vs CLOBs — where DEX-derived prices come from
  • MEV — oracle updates are themselves a target for ordering games