Pyth: what the oracle is and what you use it for
Pyth is a first-party market data oracle: pull and push price feeds across 100+ chains, Hermes updates, confidence intervals, plus Entropy RNG on EVM. What builders use it for today, what else it could power, and alternatives (Switchboard, Chainlink, RedStone, DIY).
devrels.xyz/a/218short linkAn oracle bridges off-chain facts into on-chain programs. Smart contracts cannot “call Binance”; they read accounts or messages someone put on the ledger. Pyth is one of the main oracle networks in crypto: a global price layer built around first-party publishers (exchanges, market makers, trading firms, and similar venues) that contribute market data, which applications then consume on Solana and 100+ other chains.
Docs hub: docs.pyth.network. Product surface today is broader than “SOL/USD”: crypto, equities, FX, and indexes appear in the feed catalog, with Core and Pro tiers and an upcoming Core upgrade path (API keys for Hermes from 18 Aug 2026 — check the upgrade guides if you integrate near that date).
What Pyth is (mechanically)
| Piece | Role |
|---|---|
| Publishers | Source prices from their own books / systems (first-party) |
| Aggregation | Combine publisher inputs into a feed with price, confidence, and exposure metadata |
| Hermes | Web service that serves signed price updates for apps to fetch off-chain |
| On-chain programs / contracts | Verify and store updates; your program reads price accounts or latest update |
| Pull integration | Default: your tx (or crank) posts a fresh update, then uses it — lowest latency to “price at use” |
| Push integration | Keepers or schedules keep feeds fresh on-chain without every user pulling |
Official framing: Core targets decentralized, multi-chain delivery with pull and push (docs cite ~400ms-class update frequency and broad chain coverage). Pyth Pro targets ultra-low-latency / customizable channels for venues that need tighter market-data product features. Feed IDs and contract addresses are listed in the developer hub.
Typical Solana pull flow
1. Client/crank: GET signed price update from Hermes (feed id)
2. Tx ix: post update to Pyth receiver / price account
3. Same tx (or immediately after): your program reads price + conf
4. Enforce: max confidence, max age, maybe ema vs spot rulesSafe use is not “read a number.” It is price + confidence + age + stall rules. Wide confidence or stale publish time should fail closed on risk engines.
What people use Pyth for today
| Domain | How the feed is used |
|---|---|
| Perps / derivatives | Mark price, funding references, liquidation thresholds, insurance logic |
| Lending / money markets | Collateral valuation, borrow limits, liquidation triggers |
| Structured / synthetic assets | Mint/redeem pegs, basket NAV, settlement prices |
| FX and RWA-linked products | On-chain USD pairs, equity/index references where listed feeds exist |
| DeFi risk & keepers | Off-chain monitors + on-chain settle that must agree on the same oracle |
| UI / analytics | Off-chain price display, charts (TradingView guides exist), without putting every tick on-chain |
| Historical / research | Benchmarks / historical APIs for backtests and dispute windows |
On Solana specifically, pull integrations are the usual path for protocols that need the price in the transaction that moves risk — liquidations, opens, collateral adjusts — so nobody relies on a stale account someone else paid to update hours ago.
What else it could be used for
Same primitive, wider product surface — if the feed catalog and confidence behavior fit the risk:
- On-chain funds and tokenized treasuries — NAV marks, fee accrual, gated subscriptions at oracle time
- Prediction / insurance settlement — resolve on published index/FX/equity feeds where governance accepts Pyth as source of truth
- Dynamic fees and bonding curves — fee tiers or mint prices that track an external reference
- Cross-margin and portfolio margin — correlated assets under one oracle family with explicit confidence haircuts
- Agent / intent systems — agents that only sign if on-chain mark is inside a band (combine with cranks / TukTuk for scheduled checks)
- Compliance-shaped products — circuit breakers when confidence blows out or publish stalls
Adjacent product: Pyth Entropy — verifiable RNG aimed at EVM games, mints, lotteries (commit-reveal). Useful when your randomness need is EVM-side; Solana apps often use other VRF/RNG stacks (including Switchboard randomness). Don’t conflate Entropy with price feeds.
Design rules when you build on Pyth
- Check confidence — treat wide bands as “don’t liquidate / don’t mint”
- Check publish time / slot age — reject stale updates
- Prefer pull in the same tx for risk-critical paths
- Know feed IDs per environment; don’t hardcode the wrong cluster’s account
- Plan for Hermes / API key policy changes (Core upgrade timeline)
- Separate trading mark from conservative collateral mark if your risk policy needs haircuts beyond conf
Alternatives
No oracle is universal. Choose on feed coverage, update model, customizability, and failure modes.
| Option | Best when | Tradeoff |
|---|---|---|
| Pyth | Canonical multi-asset market data, pull-at-use, multi-chain same mental model | Catalog is publisher-driven — exotic long-tail assets may be missing; confidence/staleness still your problem |
| Switchboard | Custom jobs, arbitrary APIs, app-specific feeds, on-chain randomness workflows on Solana | You design jobs and trust the queue/oracle set; more ops surface than a fixed Pyth feed |
| Chainlink | EVM-heavy stacks, established feed ops, CCIP-style cross-chain messaging ecosystems | Different integration model and product mix; Solana depth varies by product |
| RedStone / other modular oracles | Classic pull-style data packages, flexible delivery, multi-chain app patterns | Evaluate signer sets, latency, and Solana-specific support per release |
| AMM TWAP / pool spot | Assets whose only honest market is your pool; governance tokens; long-tail mints | Manipulable on thin liquidity; TWAPs lag; bad for isolated collateral without caps |
| Specialist / RWA oracles | NAV from a fund admin, permissioned FX, exchange-specific indexes | Centralization and legal dependency; often hybrid with Pyth for crypto legs |
| DIY multisig / committee | Hackathon prototypes, private clubs | Not a production oracle — no publisher diversity, easy capture |
Practical Solana split many teams use: Pyth for majors and liquid cross-venue assets; Switchboard when you need a custom job or randomness; pool TWAP only with strict caps and manipulation-aware risk; never a single thin pool spot for large collateral.
Quick chooser
| Need | Start with |
|---|---|
| SOL/BTC/ETH marks on Solana perps/lending | Pyth pull in-tx |
| “Scrape this API / custom index” | Switchboard job |
| EVM lottery / game RNG | Pyth Entropy (or chain-native VRF) |
| Illiquid meme collateral | Don’t; or tiny caps + TWAP + human process |
| UI ticker only | Hermes / off-chain price APIs (no on-chain cost) |
Related on DevRels
Summary
Pyth is a first-party market-data oracle network: publishers contribute prices, apps pull (or push) verified updates on-chain, and programs act on price plus confidence plus freshness. Builders use it for marks, liquidations, collateral, synthetics, and multi-asset references across many chains. It is not the only oracle — Switchboard covers custom data, other networks dominate some ecosystems, and pool TWAPs remain a last resort for assets with no honest external market. Match the feed to the risk, and fail closed when confidence or time says the number is not safe to use.
Keep reading
Pyth's publisher network, the aggregated price account, the Push (Solana-native) vs Pull (cross-chain) models, EMA price, confidence intervals, and how to consume a feed safely.
Time locks release on a clock. Price-based unlocks speed up or slow down with market performance—usually via oracles—so team and investor unlocks track project success instead of a blind date.
On-chain “every hour” is not a timer — it is an instruction someone is willing to send when your program says the work is due. TukTuk is the live permissionless crank marketplace for that job.
Get new articles in your inbox
Technical deep-dives on Solana tooling, infrastructure, and ecosystem. No noise.
