Skip to content

Commit 16f372f

Browse files
authored
Merge pull request #32 from morpho-labs/docs/readme
2 parents 9ed1932 + e7a7d50 commit 16f372f

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
11
# Morpho Blue Oracles
22

3+
4+
Morpho Blue Oracles are contracts that can be used as oracles for markets on [Morpho Blue](https://github.com/morpho-org/morpho-blue).
5+
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+
7+
## ChainlinkOracle
8+
9+
The `ChainlinkOracle` is an oracle that uses Chainlink-compliant feeds to provide price data.
10+
11+
This oracle handles the following cases among others (let's say that our pair is A/B):
12+
- A/B is a feed (typically, stETH/ETH).
13+
- B/A is a feed (typically, ETH/USDC).
14+
- A/C and B/C are feeds (typically, stETH/ETH and USDC/ETH).
15+
- A/C, C/D and B/D are feeds (typically, WBTC/BTC, BTC/USD, USDC/USD).
16+
- A/D, and B/C, C/D are feeds (typically, USDC/USD, WBTC/BTC, BTC/USD).
17+
- A/C, C/D and B/E, E/D are feeds.
18+
- A/C and C/B are feeds (typically, WBTC/BTC and BTC/ETH).
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+
21+
## Getting Started
22+
23+
Install dependencies: `forge install`
24+
25+
In a `.env` file, set `ETH_RPC_URL` to the URL of an Ethereum provider.
26+
27+
Run test: `forge test`
28+
329
## License
430

531
Morpho Blue Oracles are licensed under `GPL-2.0-or-later`, see [`LICENSE`](./LICENSE).

0 commit comments

Comments
 (0)