Skip to content

Commit 6c55202

Browse files
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]>
1 parent ec1d99c commit 6c55202

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

pages/price-feeds/_meta.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,6 @@
6060
},
6161

6262
"pull-updates": "What is a Pull Oracle?",
63+
"why-update-prices": "Why Update Prices",
6364
"how-pyth-works": "How Pyth Works"
6465
}

pages/price-feeds/how-pyth-works/_meta.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"pythnet": "Pythnet",
33
"oracle-program": "Oracle Program",
44
"cross-chain": "Cross-chain",
5-
"why-update-prices": "Why Update Prices",
65
"fees": "Fees",
76
"hermes": "Hermes",
87
"price-aggregation": "Price Aggregation",

pages/price-feeds/use-real-time-data/pull-integration/evm.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ Then add the following line to your `remappings.txt` file:
4747
```
4848

4949
<Callout type="warning" emoji="⚠️">
50-
**Important**: Pyth uses a pull-based oracle model that requires users to
51-
update prices on-chain before reading them. If you don't update the price or
52-
if the on-chain price becomes too stale, calls to `getPriceNoOlderThan()` will
50+
**Important**: Pyth uses a pull oracle model that requires users to update
51+
prices on-chain before reading them. If you don't update the price or if the
52+
on-chain price becomes too stale, calls to `getPriceNoOlderThan()` will
5353
revert with a `StalePrice` error (0x19abf40e). Learn more about [why you need
54-
to update prices](../../how-pyth-works/why-update-prices) and see [how to
55-
fetch price updates](../../fetch-price-updates) for implementation details.
54+
to update prices](../../why-update-prices) and see [how to fetch price
55+
updates](../../fetch-price-updates) for implementation details.
5656
</Callout>
5757

5858
## Write Contract Code
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# Why Update Prices
22

3-
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.
44

55
This design offers several advantages:
66

77
- **Lower costs**: You only pay for price updates when you need them
88
- **Lower latency**: You can fetch the latest price update directly from Pyth's low-latency oracle network and submit it on-chain immediately
99
- **Flexibility**: Different applications can update prices at different frequencies based on their needs
1010

11-
In the Pull integration pattern, your contract must:
11+
In the pull integration pattern, your contract must:
1212

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))
1414
2. Call `updatePriceFeeds()` to submit this data on-chain before reading prices
1515
3. Pay a small fee for each update (calculated via `getUpdateFee()`)
1616

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

Comments
 (0)