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
Copy file name to clipboardExpand all lines: pages/price-feeds/use-pyth-for-morpho.mdx
+9-11Lines changed: 9 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,15 +2,16 @@ import { Steps } from "nextra/components";
2
2
3
3
# How to use Pyth for Morpho Markets
4
4
5
-
At the time of writing, Morpho supports an [oracle interface](https://github.com/morpho-org/morpho-blue-oracles/tree/main/src) similar to ChainlinkAggregatorV3Interface.
6
-
7
5
This guide will show how you can leverage Pyth real time price data to power Morpho markets.
8
6
9
-
There are three main steps to use Pyth price feeds for Morpho markets:
7
+
At the time of writing, Morpho supports an [oracle interface](https://github.com/morpho-org/morpho-blue-oracles/tree/main/src) similar to [ChainlinkAggregatorV3Interface](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol).
8
+
We need to wrap the Pyth oracle with this interface to use it with Morpho.
9
+
10
+
There are three steps to use Pyth price feeds for Morpho markets:
10
11
11
12
1. Deploy the [`PythAggregatorV3`](https://github.com/pyth-network/pyth-crosschain/blob/main/target_chains/ethereum/sdk/solidity/PythAggregatorV3.sol) contract to provide a Chainlink-compatible feed interface.
12
-
2. Run the price pusher or scheduler
13
-
3. Deploy the Morpho oracle contract
13
+
2. Run the price pusher or scheduler.
14
+
3. Deploy the Morpho oracle contract.
14
15
15
16
<Steps>
16
17
@@ -22,7 +23,7 @@ This wrapper allows you to use Pyth price feeds with Morpho markets.
22
23
23
24
You can use the forge [script](https://github.com/pyth-network/pyth-examples/blob/main/price_feeds/evm/chainlink_migration/script/PythAggregatorV3Deployment.s.sol) from the [pyth-examples](https://github.com/pyth-network/pyth-examples/tree/main/price_feeds/evm/chainlink_migration) directory to deploy the `PythAggregatorV3` contract.
@@ -38,17 +39,14 @@ If you are using the `PythAggregatorV3` contract, you must push price updates to
38
39
The Pyth Data Association sponsors regular on-chain updates for some price feeds.
39
40
See [Sponsored Feeds](./sponsored-feeds.mdx) for the current list of feeds and their update parameters.
40
41
41
-
If you don't find relevant price feeds in the [Sponsored Feeds](./sponsored-feeds.mdx) list, you can run the scheduler/price pusher for the price feed you need.
42
+
If you don't find relevant price IDs in the [Sponsored Feeds](./sponsored-feeds.mdx) list, you can run the scheduler/price pusher for the price feed you need.
42
43
43
44
Please see [Schedule Price Updates](./schedule-price-updates.mdx) for more information on how to schedule price updates.
44
45
45
46
### Deploy the Morpho oracle contract
46
47
47
-
After deploying the `PythAggregatorV3` contract and scheduling price updates, you can deploy the Morpho oracle contract with the address of the `PythAggregatorV3` contract.
48
+
After deploying the `PythAggregatorV3` contract and scheduling price updates, you can deploy the Morpho oracle contract with the address of the `PythAggregatorV3` contract deployed in the first step.
48
49
49
50
Please refer to the [Morpho documentation](https://docs.morpho.org/morpho/tutorials/deploy-an-oracle/) for more information on how to deploy the Morpho oracle contract.
0 commit comments