Education · 5 min read

How Pyth's Pull Oracle Works

Why Pyth is fundamentally different from push-based oracles — and why that matters for DeFi.

The problem with push oracles

Traditional oracles like Chainlink use a push model: a network of nodes writes price updates to the blockchain on a fixed schedule — for example, every heartbeat (e.g. 1 hour) or whenever the price moves more than a deviation threshold (e.g. 0.5%).

The cost of this model scales with the number of feeds × chains. Each update is an on-chain transaction. For 1,000 feeds across 20 chains, that's potentially 20,000 transactions per heartbeat — most of which nobody reads. The protocol pays for updates nobody needed.

Pyth's pull model

Pyth flips this: price updates are published off-chain to Pythnet(a dedicated Solana appchain) at sub-second intervals. The data lives off-chain at hermes.pyth.network.

When your DeFi protocol actually needs a price — say, a user is being liquidated — it pulls the latest price update from Hermes, bundles it into the transaction, and submits it. The Pyth contract on-chain verifies the Wormhole attestation and stores the price temporarily.

Pull model in a lending protocol

  1. User calls liquidate(borrower)
  2. Your frontend fetches the signed price update from Hermes
  3. Your contract calls pyth.updatePriceFeeds(update) first
  4. Then reads pyth.getPrice(BTC_FEED_ID)
  5. Proceeds with liquidation using the fresh price

Why this is better

Cost
Push: Protocol pays for every update, used or not
Pull: Only pay when your app actually needs a price
Freshness
Push: Price age = heartbeat interval (often minutes)
Pull: Price published every 400ms — always fresh
Multi-chain
Push: Must deploy & maintain node infra per chain
Pull: One off-chain network, any chain via Wormhole
Feed count
Push: Limited — high cost per feed
Pull: 1,800+ feeds — economics scale differently

The confidence interval

Every Pyth price update includes a confidence interval — a ±range that represents the oracle's uncertainty at that moment. A tight CI means data sources agree; a wide CI means they disagree or liquidity is thin. The CI is what makes Pyth useful for risk calculations — and what this app's Calibration Analysis measures.