All articles
solanapythoracleprice-feedsdefiswitchboardhermesbuilders

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 link

An 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)

Core pieces
PieceRole
PublishersSource prices from their own books / systems (first-party)
AggregationCombine publisher inputs into a feed with price, confidence, and exposure metadata
HermesWeb service that serves signed price updates for apps to fetch off-chain
On-chain programs / contractsVerify and store updates; your program reads price accounts or latest update
Pull integrationDefault: your tx (or crank) posts a fresh update, then uses it — lowest latency to “price at use”
Push integrationKeepers 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.

text
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 rules

Safe 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

Production-shaped uses
DomainHow the feed is used
Perps / derivativesMark price, funding references, liquidation thresholds, insurance logic
Lending / money marketsCollateral valuation, borrow limits, liquidation triggers
Structured / synthetic assetsMint/redeem pegs, basket NAV, settlement prices
FX and RWA-linked productsOn-chain USD pairs, equity/index references where listed feeds exist
DeFi risk & keepersOff-chain monitors + on-chain settle that must agree on the same oracle
UI / analyticsOff-chain price display, charts (TradingView guides exist), without putting every tick on-chain
Historical / researchBenchmarks / 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.

Oracle / price-source options
OptionBest whenTradeoff
PythCanonical multi-asset market data, pull-at-use, multi-chain same mental modelCatalog is publisher-driven — exotic long-tail assets may be missing; confidence/staleness still your problem
SwitchboardCustom jobs, arbitrary APIs, app-specific feeds, on-chain randomness workflows on SolanaYou design jobs and trust the queue/oracle set; more ops surface than a fixed Pyth feed
ChainlinkEVM-heavy stacks, established feed ops, CCIP-style cross-chain messaging ecosystemsDifferent integration model and product mix; Solana depth varies by product
RedStone / other modular oraclesClassic pull-style data packages, flexible delivery, multi-chain app patternsEvaluate signer sets, latency, and Solana-specific support per release
AMM TWAP / pool spotAssets whose only honest market is your pool; governance tokens; long-tail mintsManipulable on thin liquidity; TWAPs lag; bad for isolated collateral without caps
Specialist / RWA oraclesNAV from a fund admin, permissioned FX, exchange-specific indexesCentralization and legal dependency; often hybrid with Pyth for crypto legs
DIY multisig / committeeHackathon prototypes, private clubsNot 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

Starting point
NeedStart with
SOL/BTC/ETH marks on Solana perps/lendingPyth pull in-tx
“Scrape this API / custom index”Switchboard job
EVM lottery / game RNGPyth Entropy (or chain-native VRF)
Illiquid meme collateralDon’t; or tiny caps + TWAP + human process
UI ticker onlyHermes / 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

Get new articles in your inbox

Technical deep-dives on Solana tooling, infrastructure, and ecosystem. No noise.

Pyth: what the oracle is and what you use it for | devrels.xyz