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
+2-3Lines changed: 2 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -7,12 +7,11 @@ Pyth is a protocol that allows market participants to publish pricing informatio
7
7
3._Consumers_ read the price information produced by the oracle program.
8
8
9
9
Pyth's oracle program runs on [Pythnet](how-pyth-works/pythnet.md).
10
-
[Pythnet Price Feeds](./) are available on 50+ blockchains.
11
10
The prices constructed on Pythnet are transferred [cross-chain](how-pyth-works/cross-chain.md) to reach consumers on these blockchains.
12
11
13
12
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.
13
+
This program maintains a number of different [SVM accounts](pythnet-reference/account-structure.md) that list the products on Pyth and their current price data.
15
14
Publishers publish their price and confidence by interacting with the oracle program on every slot.
16
15
The program stores this information in its accounts.
17
16
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.
18
-
This aggregate price is written to the Solana account where it is available for transmission to other blockchains.
17
+
This aggregate price is written to these SVM accounts of Pythnet where it is available for transmission to other blockchains.
Copy file name to clipboardExpand all lines: pages/price-feeds/how-pyth-works/oracle-program.mdx
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ 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](../pythnet-reference/account-structure.md) to represent the set of price feeds.
10
+
The oracle solves these problems by maintaining a collection of [SVM accounts](../pythnet-reference/account-structure.md) to represent the set of price feeds.
11
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.
Copy file name to clipboardExpand all lines: pages/price-feeds/how-pyth-works/price-aggregation.mdx
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ Second, the **aggregate price should appropriately weight data sources with diff
13
13

14
14
15
15
Finally, the **aggregate confidence interval should reflect the variation between publishers’ prices.**
16
-
Under normal market conditions, we expect the a product to trade at a similar price across exchanges.
16
+
Under normal market conditions, we expect a product to trade at a similar price across exchanges.
17
17
In these cases, we would like the aggregate confidence interval to reflect the confidence intervals of the individual data providers, as shown in the figure on the left.
18
18
However, in some rare situations, a product can trade at different prices on different exchanges.
19
19
In these cases, the aggregate confidence interval should widen out to reflect the variation between these prices, as shown in the figure on the right.
@@ -24,7 +24,7 @@ In these cases, the aggregate confidence interval should widen out to reflect th
24
24
25
25
The aggregation algorithm itself is a simple two-step process.
26
26
The first step computes the aggregate price by giving each publisher three votes — one vote at their price and one vote at each of their price +/- their confidence interval — then taking the median of all the votes.
27
-
The second step computes distance from the aggregate price to the 25th and 75th percentiles of the votes, then selects the larger of the two as the aggregate confidence interval.
27
+
The second step computes the distance from the aggregate price to the 25th and 75th percentiles of the votes, and then selects the larger of the two as the aggregate confidence interval.
28
28
29
29
This process acts like a hybrid between a mean and a median, giving confident publishers more influence, while still capping the maximum influence of any single publisher.
30
30
The algorithm has an interpretation as computing the minimum of an objective function that penalizes the aggregate price from deviating too far from the publishers' prices.
0 commit comments