Skip to content

fix(benchamrks) Fix broken links #455

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 1 commit into from
Oct 15, 2024
Merged
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
6 changes: 3 additions & 3 deletions pages/benchmarks/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ Technically, each displayed price corresponds to the Pyth price update published

## On-Chain Contracts

On-chain contracts can consume benchmark prices using the same pull model as [Pythnet Price Feeds](pythnet-price-feeds.md).
On-chain contracts can consume benchmark prices using the same pull model as [Pythnet Price Feeds](../price-feeds/price-feed-ids.mdx).
Integrators can follow these three steps:

1. Use the [Hermes](pythnet-price-feeds/hermes) endpoint `/api/get_vaa` to retrieve a signed price update for the desired price feed and time.
1. Use the [Hermes](pythnet-price-feeds/hermes) endpoint `/v2/updates/price/{price_time}` to retrieve a signed price update for the desired price feed and time.
This endpoint will return a signed price update, specifically the price update immediately after the queried time.
This step can be done in either a web frontend or a backend process, depending on who is expected to initiate the transaction.
2. Pass this price update to your on-chain contract as part of the transaction that needs the benchmark data.
Expand All @@ -30,7 +30,7 @@ Integrators can follow these three steps:
The price update will only be valid if the signatures are correct and the update falls within a user-configured time interval; integrators should set this time interval such that it matches their desired time.

Note that this process is similar to the standard process for consuming pull updates.
The main differences are that users call the `get_vaa` endpoint instead of `latest_vaas`, and the on-chain contract calls `parsePriceFeedUpdates` instead of `updatePriceFeeds`.
The main differences are that users call the `/v2/updates/price/{price_time}` endpoint instead of `/v2/updates/price/latest`, and the on-chain contract calls `parsePriceFeedUpdates` instead of `updatePriceFeeds`.
The pyth-crosschain repo has [example code](https://github.com/pyth-network/pyth-crosschain/blob/main/target_chains/ethereum/sdk/js/src/examples/EvmBenchmark.ts) for an integration along the lines above for EVM chains.

## API Documentation
Expand Down
Loading