Skip to content

fix: remove Solana push oracle mentions #387

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions pages/price-feeds/how-pyth-works.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@ Pyth is a protocol that allows market participants to publish pricing informatio
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.

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).
[Pythnet Price Feeds](./) are available on 50+ blockchains.
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.
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](pythnet-reference/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.
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 Solana account where it is available for transmission to other blockchains.
4 changes: 2 additions & 2 deletions pages/price-feeds/how-pyth-works/ema-price-aggregation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ Find the implementation in our [GitHub](https://github.com/pyth-network/pyth-cli

**How does Pyth calculate its EMA Price and EMA Confidence?**

The EMA Price (`ema_price`) and EMA Confidence (`ema_confidence`) values are derived directly from the aggregated prices and confidences Pyth has generated on-chain. Publishers do not submit either EMA Price or EMA Confidence values, they only publish to Solana a “live” price and its associated confidence interval which will, in turn, be used for EMA Price and EMA Confidence calculation.
The EMA Price (`ema_price`) and EMA Confidence (`ema_confidence`) values are derived directly from the aggregated prices and confidences Pyth has generated on-chain. Publishers do not submit either EMA Price or EMA Confidence values, they only publish to Pythnet a “live” price and its associated confidence interval which will, in turn, be used for EMA Price and EMA Confidence calculation.

The current Pyth averaging method is a slot-weighted, inverse confidence-weighted exponential moving average of the aggregate price (and confidence interval).

- **Slot weighted** — The Pyth EMA uses the Solana slot number to measure the passage of time. The averaging period is 5921 slots, which corresponds to approximately 1 hour on Solana mainnet.
- **Slot weighted** — The Pyth EMA uses the Pythnet slot number to measure the passage of time. The averaging period is 5921 slots, which corresponds to approximately 1 hour on Pythnet.
- **Inverse confidence weighted** — Weighting each sample by 1/Confidence lets the EMA give more weight to samples with tight confidence and ignore samples with very wide confidence. Below is an example of an outlier aggregate price with a wide confidence interval. Notice how the average using inverse confidence weighting does not get pulled up by the outlier sample while the uniform weighted average does.

![](../../../images/EMA_Price_Aggregation_2.png)
Expand Down
4 changes: 2 additions & 2 deletions pages/price-feeds/how-pyth-works/oracle-program.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ The oracle program is responsible for several tasks:
3. Combining the individual data providers' prices into a single aggregate price and confidence interval.
4. Performing any additional stateful computations on the resulting price series, such as computing moving averages.

The oracle solves these problems by maintaining a collection of [Solana accounts](account-structure.md) to represent the set of price feeds.
Each feed has two accounts: a product account to store [metadata](product-metadata.md) and a price account.
The oracle solves these problems by maintaining a collection of [Solana accounts](../pythnet-reference/account-structure.md) to represent the set of price feeds.
Each feed has two accounts: a product account to store [metadata](../pythnet-reference/product-metadata.md) and a price account.
The price account stores a list of authorized data providers for this specific price feed, and allocates storage space for each data provider's price.
The oracle program exposes an instruction called `upd_price` that enables an authorized data provider to update the price account with their current estimate of the price and confidence interval.
Additionally, the first time that `upd_price` is called in a slot, it will [aggregate](price-aggregation.md) the individual data provider's prices into an aggregate price and confidence interval.
Expand Down
2 changes: 1 addition & 1 deletion pages/price-feeds/how-pyth-works/pythnet.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Pythnet is an application-specific blockchain operated by Pyth's data providers.
This blockchain is a computation substrate to securely combine the data provider's prices into a single aggregate price for each Pyth price feed.
Pythnet forms the core of Pyth's off-chain price feeds that serve all blockchains (except Solana mainnet).
Pythnet forms the core of Pyth's off-chain price feeds that serve all blockchains.

Pythnet is powered by Solana technology: it runs the same validator software, but is a Pyth specific chain that is independent of Solana's mainnet.
The Pyth Data Association enables each data provider to operate one validator by delegating them the necessary stake.
Expand Down
Loading