Design Overview
Pyth is a protocol that allows market participants to publish pricing information on-chain for others to use. The protocol is an interaction between three parties:
- Publishers submit pricing information to Pyth's oracle program. Pyth has multiple data publishers for every product to improve the accuracy and robustness of the system.
- Pyth's oracle program combines publishers' data to produce a single aggregate price and confidence interval.
- Consumers read the price information produced by the oracle program.
Pyth's oracle program runs on Pythnet. The prices constructed on Pythnet are transferred cross-chain to reach consumers on these blockchains.
The critical component of the system is the oracle program that combines the data from each individual publisher. This program maintains a number of different SVM accounts that list the products on Pyth and their current price data. Publishers publish their price and confidence by interacting with the oracle program on every slot. The program stores this information in its accounts. The first price update in a slot additionally triggers price aggregation, which combines the price data from the previous slot into a single aggregate price and confidence interval. This aggregate price is written to these SVM accounts of Pythnet where it is available for transmission to other blockchains.