| Authors | Pyth Data Association |
|---|---|
| Year | 2021 |
| Project | Pyth Network |
| License | Apache 2.0 |
| Official Source | https://pyth.network/whitepaper |
This page is an educational summary and analysis of an official whitepaper or technical paper, written for reference purposes. It is not a verbatim reproduction. CryptoGloss does not claim authorship of the original work. All intellectual property rights remain with the original author(s). The official document is linked above.
“Pyth: A First-Party Financial Oracle Network” is the 2021 paper by the Pyth Data Association describing the Pyth Network — a blockchain oracle system distinguished by its first-party data model: instead of third-party data aggregators crawling public sources (like Chainlink’s model), Pyth’s price publishers are institutional financial firms — trading desks, exchanges, market makers — that publish the prices they directly observe and trade at from their own order flow.
Pyth launched on Solana in 2021 (leveraging Solana’s high throughput for sub-second price updates), before expanding to 40+ chains via a cross-chain pull architecture (Wormhole for cross-chain delivery).
> Whitepaper: Available at pyth.network/whitepaper.
Publication and Context
Blockchain oracles — the systems that bring off-chain price data on-chain — were a critical DeFi infrastructure chokepoint in 2020–2021. Chainlink (the dominant oracle at the time) aggregated data from multiple third-party providers who scraped centralized exchanges. This model introduced aggregation latency (updates every 20–60 seconds, or only on deviation thresholds) and middlemen who could themselves be manipulated.
Pyth’s innovation: remove intermediaries by having the original trading institution publish its own prices directly. A market-making firm at the CME knows the exact current bid/ask spread — they should publish that directly, not rely on a data aggregator to scrape a public API.
First-Party Publisher Model
Traditional (Chainlink-style) pipeline:
Exchange API → Data Provider → Aggregator Network → On-Chain Price
[2–3 hops with aggregation latency]
Pyth’s first-party pipeline:
Trading Firm/Exchange → Pyth Contract (Solana) → On-Chain Price
[1 hop, ~400ms on Solana]
Publishers include: Jump Trading, Two Sigma, Virtu Financial, Cboe, Nasdaq, Jane Street, B2C2, and ~90 other institutional participants (as of 2024). These entities publish prices because they benefit from a healthy DeFi ecosystem that uses accurate prices.
Each publisher submits:
- Price (mid-price or last-trade price)
- Confidence interval (their uncertainty around the price, e.g., ±$0.50)
Price Aggregation: Confidence-Weighted Median
Pyth does not simply average publisher prices. The aggregation algorithm:
- Collect all publisher (price, confidence) pairs in the current slot
- Discard publishers whose prices are outliers relative to the cluster
- Compute the weighted median of remaining prices, where weights are inversely proportional to confidence interval size (more confident publishers count more)
- Compute the aggregate confidence interval
Why median, not mean? A single malicious publisher can move the mean arbitrarily, but cannot change the median unless they control a supermajority of weight. The confidence-weighted median is manipulation-resistant.
Exponential Moving Average (EMA)
In addition to the spot price aggregation, Pyth publishes an EMA price — an exponentially weighted moving average with a 10-second half-life:
$$text{EMA price}_t = alpha cdot text{price}_t + (1 – alpha) cdot text{EMA price}_{t-1}$$
The EMA is used by some DeFi protocols for borrow rate calculations or liquidation thresholds where high-frequency volatility would be dangerous (e.g., a flash crash shouldn’t instantly liquidate all leveraged positions).
Pull Oracle Architecture
Pyth uses a pull architecture rather than a push architecture:
Push oracle (Chainlink default): The oracle contract maintains an on-chain price that is updated by oracle nodes via transactions. Every L2/sidechain needs its own deployed contract with its own update frequency.
Pyth pull oracle: Price updates are not broadcast to all chains continuously. Instead:
- Pyth publishes signed price update attestations off-chain (via Wormhole VAAs)
- When a DeFi protocol needs the current price, the user (or app) fetches the latest signed attestation off-chain
- The user submits the attestation on-chain as part of their transaction
- The Pyth receiver contract verifies the Wormhole attestation signature and returns the price
Advantage: Pyth can serve 40+ chains without maintaining continuous oracle update transactions on each chain. Gas costs for price updates are borne by the users who need them.
Reality Check
Pyth’s first-party model is a genuine improvement for market data quality — trading firms have better, lower-latency price information than public API scrapers. The confidence interval is a meaningful addition that no previous production oracle provided.
Caveats:
- Publisher incentive alignment: Publishers are large institutions that benefit from DeFi volume but are not currently paid directly per price publication. The model assumes ongoing voluntary participation.
- Centralization of publisher set: The publisher set is permissioned; the Pyth Data Association and governance control who is admitted. This is a different type of centralization than third-party aggregators.
- Flash loan / oracle manipulation: Pyth’s spot price is still susceptible to manipulation if publishers observe manipulated prices on exchanges. The EMA provides some protection.
Legacy
Pyth pioneered the pull oracle model now widely adopted (Chainlink’s Data Streams, RedStone), the use of confidence intervals for oracle uncertainty, and the first-party publisher concept for institutional-grade DeFi pricing. Pyth’s cross-chain architecture via Wormhole served as an early template for multi-chain oracle deployment.
Related Terms
Research
- Pyth Data Association. (2021). Pyth: A First-Party Financial Oracle Network. pyth.network/whitepaper.
— Primary whitepaper. Section 3 defines publisher submission; Section 4 covers the confidence-weighted median aggregation.
- Breidenbach, L., et al. (2021). Chainlink 2.0: Next Steps in the Evolution of Decentralized Oracle Networks. Chainlink Labs.
— The competing oracle design; useful for comparing Chainlink’s push/aggregation model to Pyth’s first-party pull approach.
- Werner, S.M., et al. (2022). SoK: Decentralized Finance (DeFi). ACM CCS 2022.
— Comprehensive DeFi survey; Section 4 covers oracle design patterns including both push and pull architectures.