You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/price-feeds/how-pyth-works.mdx
+5-8Lines changed: 5 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -6,16 +6,13 @@ Pyth is a protocol that allows market participants to publish pricing informatio
6
6
2. Pyth's _oracle program_ combines publishers' data to produce a single aggregate price and confidence interval.
7
7
3._Consumers_ read the price information produced by the oracle program.
8
8
9
-
Pyth's oracle program runs simultaneously on both Solana mainnet and [Pythnet](how-pyth-works/pythnet.md).
10
-
Each instance of the program is responsible for its own set of price feeds.
11
-
[Solana Price Feeds](solana-price-feeds.md) are available for use by Solana protocols.
12
-
In this case, since the oracle program itself runs on Solana, the resulting prices are immediately available to consumers without requiring any additional work.
13
-
[Pythnet Price Feeds](pythnet-price-feeds.md) are available on 12+ blockchains.
9
+
Pyth's oracle program runs on [Pythnet](how-pyth-works/pythnet.md).
10
+
[Pythnet Price Feeds](./) are available on 50+ blockchains.
14
11
The prices constructed on Pythnet are transferred [cross-chain](how-pyth-works/cross-chain.md) to reach consumers on these blockchains.
15
12
16
-
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.
17
-
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.
13
+
The critical component of the system is the [oracle program](how-pyth-works/oracle-program.md) that combines the data from each individual publisher.
14
+
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.
18
15
Publishers publish their price and confidence by interacting with the oracle program on every slot.
19
16
The program stores this information in its accounts.
20
17
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.
21
-
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.
18
+
This aggregate price is written to the Solana account where it is available for transmission to other blockchains.
Copy file name to clipboardExpand all lines: pages/price-feeds/how-pyth-works/ema-price-aggregation.mdx
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -31,11 +31,11 @@ Find the implementation in our [GitHub](https://github.com/pyth-network/pyth-cli
31
31
32
32
**How does Pyth calculate its EMA Price and EMA Confidence?**
33
33
34
-
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.
34
+
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.
35
35
36
36
The current Pyth averaging method is a slot-weighted, inverse confidence-weighted exponential moving average of the aggregate price (and confidence interval).
37
37
38
-
-**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.
38
+
-**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.
39
39
-**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.
Copy file name to clipboardExpand all lines: pages/price-feeds/how-pyth-works/oracle-program.mdx
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -7,8 +7,8 @@ The oracle program is responsible for several tasks:
7
7
3. Combining the individual data providers' prices into a single aggregate price and confidence interval.
8
8
4. Performing any additional stateful computations on the resulting price series, such as computing moving averages.
9
9
10
-
The oracle solves these problems by maintaining a collection of [Solana accounts](account-structure.md) to represent the set of price feeds.
11
-
Each feed has two accounts: a product account to store [metadata](product-metadata.md) and a price account.
10
+
The oracle solves these problems by maintaining a collection of [Solana accounts](../pythnet-reference/account-structure.md) to represent the set of price feeds.
11
+
Each feed has two accounts: a product account to store [metadata](../pythnet-reference/product-metadata.md) and a price account.
12
12
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.
13
13
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.
14
14
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.
0 commit comments