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
Address PR feedback: fix terminology and move page to top-level nav
- Changed 'pull-based oracle model' to 'pull oracle model' (2 occurrences)
- Changed 'Pull integration pattern' to 'pull integration pattern' (lowercase)
- Moved why-update-prices.mdx from how-pyth-works/ to price-feeds/ level
- Updated navigation to show in main 'Understanding Pyth' section
- Updated all links to reflect new file location
Co-Authored-By: Nidhi Singh <[email protected]>
Pyth uses a pull-based oracle model. Unlike traditional push oracles that automatically update prices on-chain at regular intervals, Pyth requires users to explicitly update the on-chain price before reading it.
3
+
Pyth uses a pull oracle model. Unlike traditional push oracles that automatically update prices on-chain at regular intervals, Pyth requires users to explicitly update the on-chain price before reading it.
4
4
5
5
This design offers several advantages:
6
6
7
7
-**Lower costs**: You only pay for price updates when you need them
8
8
-**Lower latency**: You can fetch the latest price update directly from Pyth's low-latency oracle network and submit it on-chain immediately
9
9
-**Flexibility**: Different applications can update prices at different frequencies based on their needs
10
10
11
-
In the Pull integration pattern, your contract must:
11
+
In the pull integration pattern, your contract must:
12
12
13
-
1. Accept `priceUpdate` data from the caller (fetched from [Hermes](./hermes))
13
+
1. Accept `priceUpdate` data from the caller (fetched from [Hermes](./how-pyth-works/hermes))
14
14
2. Call `updatePriceFeeds()` to submit this data on-chain before reading prices
15
15
3. Pay a small fee for each update (calculated via `getUpdateFee()`)
16
16
17
-
If you don't update the price or if the on-chain price becomes too stale, calls to `getPriceNoOlderThan()` will revert with a `StalePrice` error. See [how to fetch price updates](../fetch-price-updates) for more details on obtaining price updates.
17
+
If you don't update the price or if the on-chain price becomes too stale, calls to `getPriceNoOlderThan()` will revert with a `StalePrice` error. See [how to fetch price updates](./fetch-price-updates) for more details on obtaining price updates.
0 commit comments