Pyth Network

Plug live, multi-chain price feeds into your dapps with confidence and speed
Rating
Your vote:
Screenshots
1 / 6
Visit Website
pyth.network
Loading

Ship faster by wiring live prices into your app in minutes. Start by selecting the assets you need—digital tokens, stocks, currencies, or raw materials—and the chain where your contract lives. Install the SDK for your stack (Solidity, Rust, TypeScript, or Python), then pull the catalog to find each feed’s unique identifier. Your updater service fetches the freshest observation off-chain and submits a compact payload on-chain only when your logic requires it. In your contract, read the price, its confidence band, and the publish timestamp in a single call. Enforce guardrails: reject stale data older than your threshold, scale position limits using the confidence value, and fall back to a cached price or TWAP if an update hasn’t landed yet. This on-demand flow slashes gas by posting data precisely at decision time while keeping reads cheap for every transaction after.

For lending and risk systems, treat the price feed as a deterministic input to your collateral math. When users deposit or borrow, call the reader to obtain price and confidence; compute a safety-adjusted value (for example, price minus k × confidence) to set loan caps that self-tune with volatility. Your keeper watches off-chain for threshold crossings—like LTV breaches or reserve rebalances—then pushes a fresh update and executes the liquidate or repay routine atomically. Calibrate staleness windows per asset class (tight for fast-moving markets, looser where spreads are wide). Budget update frequency with simple rules: post on user actions, at heartbeat intervals, or when the confidence expands beyond a limit. All updates are aggregated from multiple professional sources, so a single post distributes a robust composite to your protocol and others on the same chain.

For trading venues—perps, margin, or options—build your marks and funding off the feed while hardening against manipulation. Use the confidence band to smooth extreme ticks, throttle mark adjustments, and gate large position opens when uncertainty spikes. Compute funding from a short moving average of the index price; drive liquidation checks by first ensuring the new observation is within your freshness SLA, then settling PnL. If you run an off-chain engine, subscribe to the price service and push updates only when they materially change; if on-chain, co-locate a lightweight relayer that batches assets and posts once per block when needed. Because the feed spans many assets across multiple verticals, you can list new markets by adding their identifiers without redesigning your oracle stack.

Operating across chains is straightforward: reuse the same price identifiers on EVM, Solana, Cosmos, or Move-based networks and keep business logic identical. In staging, point your relayer to test feeds, simulate jumps to verify circuit breakers, and assert that contracts revert on stale or overly uncertain quotes. In production, monitor feed health via webhooks or polling, alert on missing heartbeats, and auto-failover to a secondary poster. Control costs with a pay-when-you-need-it model: post for critical interactions (mints, borrows, liquidations) and let routine reads consume the last update. Security is baked in at the contract layer—updates arrive with on-chain verification—while you set app-level policies: per-asset freshness caps, maximum confidence, and emergency switches to pause markets if external conditions deteriorate.

Review Summary

Features

  • On-demand price updates, Multi-chain availability, Aggregated data from multiple publishers, Confidence intervals per feed, Fast updates and cheap reads, SDKs for Solidity/Rust/TypeScript/Python, Verified on-chain updates, Testnet feeds and tooling, Webhooks and REST price service, Pay-per-update cost model

How It’s Used

  • DeFi lending and collateral management, Liquidation and keeper bots, Perpetuals and margin trading, Options pricing and Greeks, Stablecoin collateralization and rebalancing, Cross-chain portfolio valuation, Execution engines and risk monitors, Gaming and NFTs tied to market data

Comments

User

Your vote: