From 20fac8174dd73d694215227f43e8706be3b78fb4 Mon Sep 17 00:00:00 2001 From: Aditya Arora Date: Wed, 24 Jul 2024 15:22:25 -0400 Subject: [PATCH] (refactor)-sunset-solana push oracle --- pages/price-feeds/how-pyth-works.mdx | 20 +++++++++----------- pages/price-feeds/price-feed-ids.mdx | 14 ++++---------- 2 files changed, 13 insertions(+), 21 deletions(-) diff --git a/pages/price-feeds/how-pyth-works.mdx b/pages/price-feeds/how-pyth-works.mdx index d39be3d2..20b8254e 100644 --- a/pages/price-feeds/how-pyth-works.mdx +++ b/pages/price-feeds/how-pyth-works.mdx @@ -1,21 +1,19 @@ # 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: +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: -1. _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. +1. _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. 2. Pyth's _oracle program_ combines publishers' data to produce a single aggregate price and confidence interval. -3. _Consumers_ read the price information produced by the oracle program. +3. _Consumers_ read the price information produced bsy the Oracle program. -Pyth's oracle program runs simultaneously on both Solana mainnet and [Pythnet](how-pyth-works/pythnet.md). -Each instance of the program is responsible for its own set of price feeds. -[Solana Price Feeds](solana-price-feeds.md) are available for use by Solana protocols. -In this case, since the oracle program itself runs on Solana, the resulting prices are immediately available to consumers without requiring any additional work. -[Pythnet Price Feeds](pythnet-price-feeds.md) are available on 12+ blockchains. +Pyth's oracle program runs on [Pythnet](how-pyth-works/pythnet.md). The prices constructed on Pythnet are transferred [cross-chain](how-pyth-works/cross-chain.md) to reach consumers on these blockchains. In both cases, the critical component of the system is the [oracle program](how-pyth-works/oracle-program.md) that combines the data from each individual publisher. -This program maintains a number of different [Solana accounts](how-pyth-works/account-structure.md) 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. +This program maintains a number of different [Pythnet accounts](how-pyth-works/account-structure.md) that list the products on Pyth and their current price data. +Publishers publish their prices 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](how-pyth-works/price-aggregation.md), which combines the price data from the previous slot into a single aggregate price and confidence interval. -This aggregate price is written to the Solana account where it is readable by other on-chain programs and available for transmission to other blockchains. +This aggregate price is written to the Pythnet account where it is readable by other on-chain programs and available for transmission to different blockchains. diff --git a/pages/price-feeds/price-feed-ids.mdx b/pages/price-feeds/price-feed-ids.mdx index b1b92517..bac4b48d 100644 --- a/pages/price-feeds/price-feed-ids.mdx +++ b/pages/price-feeds/price-feed-ids.mdx @@ -1,17 +1,11 @@ # Price Feed IDs -Every Pyth Price Feed has a unique ID, representing the specific pair of assets being priced (e.g., BTC/USD). +Every Pyth Price Feed has a unique ID, representing the specific pair of assets priced (e.g., BTC/USD). Every price update is tagged with the corresponding price feed ID. Applications need to store the IDs of the feeds they wish to read. -However, the ids may be represented in different formats (e.g., hex or base58) depending on the blockchain. -Price feeds also have different ids in the Stable and Beta channels. +However, depending on the blockchain, the IDs may be represented in different formats (e.g., hex or base58). +Price feeds also have different IDs in the Stable and Beta channels. The full catalog of price feeds is listed on the [pyth.network website](https://pyth.network/price-feeds/). The [Price Feed ID reference](https://pyth.network/developers/price-feed-ids) also lets you identify a feed's ID in your chosen ecosystem. -To use a price feed on-chain, look up its ID using these page, then store the feed id in your program to use for price feed queries. - -## Solana Price Feed Accounts - -On Solana, each feed additionally has a collection of **price feed accounts** containing the feed's data. -The addresses of these accounts are programmatically derived from the feed id and a shard id, which is simply a 16-bit number. -See [How to Use Real-Time Data on Solana](price-feeds/use-real-time-data/solana#write-frontend-code) for more information on price feed accounts. +To use a price feed on-chain, look up its ID using these pages, then store the feed ID in your program to use for price feed queries.