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
Morpho Blue Oracles are contracts that can be used as oracles for markets on [Morpho Blue](https://github.com/morpho-org/morpho-blue).
5
4
The oracles implement the `IOracle` interface defined in [`IOracle.sol`](https://github.com/morpho-org/morpho-blue/blob/main/src/interfaces/IOracle.sol#L9): they return the price of 1 asset of collateral token quoted in 1 asset of loan token.
6
5
7
-
## ChainlinkOracle
6
+
## MorphoChainlinkOracleV2
8
7
9
-
The `ChainlinkOracle` is an oracle that uses Chainlink-compliant feeds to provide price data.
8
+
The `MorphoChainlinkOracleV2` is an oracle that uses Chainlink-interface-compliant feeds to provide price data.
10
9
11
10
This oracle handles the following cases among others (let's say that our pair is A/B):
11
+
12
12
- A/B is a feed (typically, stETH/ETH).
13
13
- B/A is a feed (typically, ETH/USDC).
14
14
- A/C and B/C are feeds (typically, stETH/ETH and USDC/ETH).
@@ -18,32 +18,98 @@ This oracle handles the following cases among others (let's say that our pair is
18
18
- A/C and C/B are feeds (typically, WBTC/BTC and BTC/ETH).
19
19
- A'/C and B/C are feeds, and there is an exchange rate between A and A'. (typically A=sDAI and A'=DAI).
20
20
21
-
## Getting Started
21
+
## WstETH/stETH Exchange Rate Adapter
22
22
23
-
Install dependencies: `forge install`
23
+
A specific implementation, the `WstEthStEthExchangeRateChainlinkAdapter`, provides the exchange rate between wstETH and stETH as a Chainlink-interface-compliant feed.
24
24
25
-
In a `.env` file, set `ETH_RPC_URL` to the URL of an Ethereum provider.
25
+
This adapter is deployed on Ethereum Mainnet at the address [0x905b7dAbCD3Ce6B792D874e303D336424Cdb1421](https://etherscan.io/address/0x905b7dabcd3ce6b792d874e303d336424cdb1421#code).
26
26
27
-
Run test: `forge test`
27
+
## MorphoChainlinkOracleV2Factory
28
28
29
-
## Deploy an Oracle
29
+
The `MorphoChainlinkOracleV2Factory` is a factory that deploys `MorphoChainlinkOracleV2` instances.
30
30
31
-
For example, to deploy a `ChainlinkOracle` on the Ethereum mainnet for the sDAI/USDC market, run:
31
+
The factory facilitates the creation and indexing of `MorphoChainlinkOracleV2` oracles. This factory contract streamlines the process of deploying new oracles, catering to various market pairs without the need to deploy individual contracts manually for each pair.
The Ethereum Mainnet address of this factory is [0x3A7bB36Ee3f3eE32A60e9f2b33c1e5f2E83ad766](https://etherscan.io/address/0x3a7bb36ee3f3ee32a60e9f2b33c1e5f2e83ad766#code).
0 commit comments