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
- User calls
liquidate(borrower) - Your frontend fetches the signed price update from Hermes
- Your contract calls
pyth.updatePriceFeeds(update)first - Then reads
pyth.getPrice(BTC_FEED_ID) - Proceeds with liquidation using the fresh price
Why this is better
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.