Add instructions to migrate to Pyth from Chainlink#250
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| [ | ||
| "/price-feeds/pythnet-price-feeds/pull-updates", | ||
| "/price-feeds/pull-updates", | ||
| ], |
There was a problem hiding this comment.
drive-by: we moved this page and forgot a redirect. There are a couple inbound links to the old URL.
| @@ -0,0 +1,100 @@ | |||
| # Migrate from Chainlink to Pyth | |||
|
|
|||
| This guide explains how to migrate an EVM application that uses Chainlink price feeds to use Pyth price feeds. | |||
There was a problem hiding this comment.
Chainlink price feeds to use Pyth price feeds
| Pyth provides a Chainlink-compatible interface for its price feeds to make this process simple. | ||
| There are two main steps to the migration: | ||
|
|
||
| 1. Deploy the `PythAggregatorV3` contract to provide a Chainlink-compatible feed interface. |
There was a problem hiding this comment.
Let's link the the contract first time we mention it.
|
|
||
| ## Deploy Adapter Contract | ||
|
|
||
| Chainlink-compatible applications can deploy and use `PythAggregatorV3` in `@pythnetwork/pyth-sdk-solidity` as a replacement for their Chainlink price feeds. |
There was a problem hiding this comment.
It can be written like "You can deploy PythAggregatorV3 as a replacement for Chainlink price feeds"
The context for migration has been set multiple times above, so we don't need to rewrite it IMO.
| ## Schedule Updates | ||
|
|
||
| Chainlink-compatible applications typically expect on-chain price feeds to update on a schedule. | ||
| When migrating to Pyth, apps may need to schedule these price updates themselves. |
There was a problem hiding this comment.
Shouldn't we highlight this?
Or should we mention this above?
Because this is the biggest change.
| Chainlink-compatible applications can deploy and use `PythAggregatorV3` in `@pythnetwork/pyth-sdk-solidity` as a replacement for their Chainlink price feeds. | ||
| `PythAggregatorV3` is an adapter contract that wraps the Pyth contract and implements Chainlink's `AggregatorV3Interface`. | ||
|
|
||
| One important difference between Pyth and Chainlink is that the Pyth contract holds data for all price feeds, whereas Chainlink has separate instances of `AggregatorV3Interface` for each feed. |
There was a problem hiding this comment.
This narrative feels better.
"Pyth contract holds data for all price feeds, in comparison to Chainlink, which has separate instances of AggregatorV3Interface` for every feed.
Add a how-to guide explaining how to use Pyth as a drop-in replacement for chainlink compatible apps.