Skip to content

Commit 9daaec0

Browse files
committed
update
1 parent 7f05ff6 commit 9daaec0

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

pages/price-feeds/use-pyth-for-morpho.mdx

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@ import { Steps } from "nextra/components";
22

33
# How to use Pyth for Morpho Markets
44

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-
75
This guide will show how you can leverage Pyth real time price data to power Morpho markets.
86

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:
1011

1112
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.
1415

1516
<Steps>
1617

@@ -22,7 +23,7 @@ This wrapper allows you to use Pyth price feeds with Morpho markets.
2223

2324
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.
2425

25-
```bash
26+
```bash copy
2627
forge script script/PythAggregatorV3Deployment.s.sol --rpc-url $RPC_URL --broadcast --verify
2728
```
2829

@@ -38,17 +39,14 @@ If you are using the `PythAggregatorV3` contract, you must push price updates to
3839
The Pyth Data Association sponsors regular on-chain updates for some price feeds.
3940
See [Sponsored Feeds](./sponsored-feeds.mdx) for the current list of feeds and their update parameters.
4041

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.
4243

4344
Please see [Schedule Price Updates](./schedule-price-updates.mdx) for more information on how to schedule price updates.
4445

4546
### Deploy the Morpho oracle contract
4647

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.
4849

4950
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.
5051

51-
5252
</Steps>
53-
54-

0 commit comments

Comments
 (0)