-
Notifications
You must be signed in to change notification settings - Fork 31
Add instructions to migrate to Pyth from Chainlink #250
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.