The Pyth project, a oracle project on the public chain Solana, supports over 50 blockchains and occupies the fourth largest share in the oracle market. This article will provide a comprehensive interpretation of Pyth. This article is sourced from Messari’s research report and compiled, organized, and written by Deep Tide TechFlow.
Summary:
Pyth ensures the value of $5.5 billion in assets and supports price information of cryptocurrencies, stocks, forex pairs, ETFs, and commodities from 162 protocols on over 50 blockchains.
By February 2024, Pyth’s daily trading volume accounted for 20% of Solana’s total trading volume, and Pyth data providers paid $225,000 in fees on Solana in February 2024.
Pyth Network uses a first-party data provider network to directly release data to Solana and Pythnet, an application chain that provides Pyth oracle updates for all other blockchains. Data providers include institutional traders, well-known market makers, and famous DeFi protocols such as Jane Street, CTC, and Raydium.
By the end of Q2, Pyth plans to fully transition its Solana push oracle to a new Solana pull oracle.
As a leading oracle on Solana, Pyth will support many extension modules to Eclipse and launch applications on Eclipse, which is the first Layer 2 blockchain based on SVM on Ethereum.
Background:
Blockchain applications often rely on external data. However, the design of these systems limits their native interaction with external data without assistance. Therefore, blockchains rely on oracles to act as intermediaries, aggregating external data and making it available for on-chain applications.
Typically, oracle networks incentivize nodes to query specific information, achieve consensus on the values of specific data points, and release these values on the blockchain within a set timeframe. However, this “push” model can be indirect, expensive, and difficult to scale. Pyth Network addresses these issues by nurturing a primary source data provider network and coordinating a “push” model. This model reduces latency, enables rapid scalability, and lowers network costs by transferring update fees to data consumers (applications and developers).
Pyth is a network that aims to provide accurate prices for cryptocurrencies, stocks, forex pairs, ETFs, and commodities. It offers three core products: price feeds for real-time updates to smart contracts, benchmarks for historical market data, and Pyth Entropy for secure random number generation.
The robustness of Pyth’s data is largely due to its contributing provider network, which consists of nearly 100 data providers from global exchanges, trading firms, market makers, institutions, and DeFi. Some notable providers include Jane Street, Chicago Trading Company (CTC), Binance, Raydium, Osmosis, Galaxy, and 0x. Pyth focuses on providing financial market data for developers on a growing list of blockchains (over 50 at the time of writing).
Technical:
Apart from bridging the gap between blockchains and the outside world, oracles also strive to overcome oracle problems. The oracle problem refers to ensuring the security, authentication, and trustworthiness of external data while considering potential failures of external sources.
Solving the oracle problem typically involves the following steps: validating oracles or node sources, nodes signing the source data (verification), aggregating and calculating consensus for data points, and transmitting the data to the blockchain network.
The oracle problem is usually addressed through a push or pull model. Most oracles use a third-party push model, where oracle nodes are third parties that retrieve data from primary sources (exchanges) or secondary sources (data aggregators like CoinGecko and Kaiko). For example, Chainlink’s main price feed oracle nodes retrieve data from secondary sources.
Push oracles push price updates to individual blockchains at set intervals, incurring gas fees for each update on the chain. Adding price feeds or reducing the delay in on-chain updates adds more costs to the oracle network, hindering its scalability. Moreover, retrieving data requires multiple trust assumptions: primary sources are accurate and stable, secondary sources are accurate and stable, and the oracle network is stable.
Pyth Network addresses the drawbacks of the third-party push model with its pull model. Through its first-party data source provider network, Pyth removes two downstream trust assumptions about data reliability. In Pyth’s pull model, data is directly provided by exchanges, market makers, and DeFi protocols (such as Jane Street, Binance, and Raydium) within the network. These entities are incentivized to act honestly and provide robust data to maintain a good reputation and avoid being banned by protocols.
Other benefits come from cost-shifting to end consumers, where price feeds are updated based on demand rather than set intervals. Therefore, consumers initiate price updates, pulling the updates into the same DeFi transactions (e.g., asset swaps, perpetual settlement, etc.). By shifting costs to users, where updates are demand-based, Pyth redirects these costs and efficiently scales, as demonstrated by its frequent updates for 451 price feeds.
Core Interactions:
Pyth operates through two instances of its protocol: one on the Solana mainnet and another on the Pythnet Appchain. Pyth on Solana provides data only for protocols on Solana, while Pyth on Pythnet provides data for protocols on all other blockchains. In both instances, three core entities interact to facilitate oracle updates on the Pyth network: data providers/release agents (e.g., Jane Street, CTC, Binance, 0x, Raydium), Pyth oracle program (aggregation algorithm), and data consumers (applications/developers).
Data providers are validators on Pythnet. Previously, the Pyth Data Association was responsible for delegating sufficient stake to validators, but with governance launching, it will now be managed by PYTH holders. At the time of writing, there are no proposals to change the dynamics of validator stakes, and currently, all validators have equal weight. As primary suppliers of Pyth data, providers are compensated through a small fee collected from the entire DeFi transaction initiated by consumers.
The Pyth oracle program is an aggregation algorithm that combines data submitted by providers and generates aggregated prices and confidence intervals during computation. It also maintains price feeds, stores individual inputs from providers, and performs additional calculations such as moving averages. Applications and developers are the consumers who request price feed updates to read the information generated by the oracle program.
Solana-based Pyth:
Price feeds are represented by two Solana accounts: product accounts and price accounts. Product accounts store metadata about price feeds, such as stock codes, asset types, corresponding price accounts, etc. Price accounts contain the names of authorized data providers, the prices and confidence intervals submitted by each provider, the exponential moving average, etc. Both accounts are maintained by the oracle program, which also includes a third account that essentially lists the product accounts. This setup allows applications to categorize the complete list of price feeds provided by Pyth.
Providers submit price updates every 400 milliseconds (Solana’s slot length). Each update triggers frequent price and confidence interval aggregation updates used by downstream applications. (Since the oracle stores individual data values submitted by each provider, providers can be held accountable for poor performance or malicious behavior.) Solana’s low cost allows Pyth (or any oracle) to execute an efficient push model, where developers only need to pass relevant price feeds to their applications, deserialize the data, and read/integrate the released values.
It is worth noting that by the end of Q2, Pyth plans to fully transition its Solana push oracle to a new Solana pull oracle. The Pyth team has indicated through development channels that the Pyth pull oracle is already running on a development network.
Pythnet Appchain:
The Pythnet Appchain is a proof-of-authority chain on the Solana mainnet. It consists of multiple validators that are responsible for producing blocks and reaching consensus on the state of the chain. Validators on Pythnet are reputable organizations, including exchanges, market makers, and DeFi protocols, that have been onboarded through a governance process. Validators participate in consensus using a Byzantine Fault Tolerant (BFT) algorithm to ensure the security and reliability of the Pythnet Appchain.
The Pythnet Appchain is responsible for providing Pyth oracle updates to protocols on all other blockchains. It serves as a bridge between Solana and other blockchains, ensuring that price information from Pyth is accessible to applications and developers on various networks.