From 53e43b38c4825614a07b87151b89ec4cd8fbd95e Mon Sep 17 00:00:00 2001 From: Reppelin Tom <75627352+tomrpl@users.noreply.github.com> Date: Wed, 6 Mar 2024 16:19:04 +0100 Subject: [PATCH 01/13] feat(readme): explaining the oracle creation from the factory --- README.md | 90 +++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 75 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 93771c9..fbfec79 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ # Morpho Blue Oracles - Morpho Blue Oracles are contracts that can be used as oracles for markets on [Morpho Blue](https://github.com/morpho-org/morpho-blue). 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. -## ChainlinkOracle +## MorphoChainlinkOracleV2 -The `ChainlinkOracle` is an oracle that uses Chainlink-compliant feeds to provide price data. +The `MorphoChainlinkOracleV2` is an oracle that uses Chainlink-compliant feeds to provide price data. This oracle handles the following cases among others (let's say that our pair is A/B): + - A/B is a feed (typically, stETH/ETH). - B/A is a feed (typically, ETH/USDC). - A/C and B/C are feeds (typically, stETH/ETH and USDC/ETH). @@ -18,6 +18,34 @@ This oracle handles the following cases among others (let's say that our pair is - A/C and C/B are feeds (typically, WBTC/BTC and BTC/ETH). - A'/C and B/C are feeds, and there is an exchange rate between A and A'. (typically A=sDAI and A'=DAI). +## WstETH/stETH Exchange Rate Adapter + +A specific implementation, the WstEthStEthExchangeRateChainlinkAdapter, provides the exchange rate between wstETH and stETH using Chainlink. This adapter is designed for precise, decentralized price feeds on Ethereum, ensuring compatibility with the MorphoChainlinkOracleV2 for markets involving these assets. + +Deployed on Ethereum Mainnet, this adapter can be found in Ethereum Mainnet at the address [0x905b7dAbCD3Ce6B792D874e303D336424Cdb1421](https://etherscan.io/address/0x905b7dabcd3ce6b792d874e303d336424cdb1421#code). It's recommended for use as a reliable price feed source in Morpho oracles. + +## MorphoChainlinkOracleV2Factory + +The `MorphoChainlinkOracleV2Factory` is a factory that deploys `MorphoChainlinkOracleV2` instances. + +The factory facilitates the easy creation and indexing of MorphoChainlinkOracleV2 oracles. Developed by Morpho Labs, this factory contract streamlines the process of deploying new oracles, catering to various market pairs without the need for deploying individual contracts manually for each pair. + +### Usage + +The Ethereum Mainnet address of this factory is [0x3A7bB36Ee3f3eE32A60e9f2b33c1e5f2E83ad766](https://etherscan.io/address/0x3a7bb36ee3f3ee32a60e9f2b33c1e5f2e83ad766#code). + +To create a new `MorphoChainlinkOracleV2` oracle using the factory, call the createMorphoChainlinkOracleV2 function with the following parameters: + +- `baseVault`: The ERC4626 token vault for the base asset. +- `baseVaultConversionSample`: A sample size for converting base vault units. +- `baseFeed1`, `baseFeed2`: Chainlink-interface-compliant data feeds for the base asset. +- `baseTokenDecimals`: Decimal precision of the base asset. +- `quoteVault`: The ERC4626 token vault for the quote asset. +- `quoteVaultConversionSample`: A sample size for converting quote vault units. +- `quoteFeed1`, `quoteFeed2`: Chainlink-interface-compliant data feeds for the quote asset. +- `quoteTokenDecimals`: Decimal precision of the quote asset. +- `salt`: A unique identifier to create deterministic addresses for deployed oracles. + ## Getting Started Install dependencies: `forge install` @@ -28,17 +56,49 @@ Run test: `forge test` ## Deploy an Oracle -For example, to deploy a `ChainlinkOracle` on the Ethereum mainnet for the sDAI/USDC market, run: - -```bash -forge create src/ChainlinkOracle.sol:ChainlinkOracle --constructor-args "0x83F20F44975D03b1b09e64809B757c47f942BEeA" "0xAed0c38402a5d19df6E4c03F4E2DceD6e29c1ee9" "0x0000000000000000000000000000000000000000" "0x8fFfFfd4AfB6115b954Bd326cbe7B4BA576818f6" "0x0000000000000000000000000000000000000000" "1000000000000000000" "18" "6" --rpc-url https://eth-mainnet.g.alchemy.com/v2/ --from --ledger -`````` - -And for the rETH/WETH market, run: - -```bash -forge create src/ChainlinkOracle.sol:ChainlinkOracle --constructor-args "0x0000000000000000000000000000000000000000" "0x536218f9E9Eb48863970252233c8F271f554C2d0" "0x0000000000000000000000000000000000000000" "0x0000000000000000000000000000000000000000" "0x0000000000000000000000000000000000000000" "1" "18" "18" --rpc-url https://eth-mainnet.g.alchemy.com/v2/ --from --ledger -``` +To deploy a `MorphoChainlinkOracleV2` on the Ethereum mainnet, use the `MorphoChainlinkOracleV2Factory` to create a new oracle. + +Below are the arguments to fill for the creation of the WETH/USDT oracle: + +- `baseVault`: 0x0000000000000000000000000000000000000000, +- `baseVaultConversionSample`:1, +- `baseFeed1`: 0x0000000000000000000000000000000000000000, +- `baseFeed2`: 0x0000000000000000000000000000000000000000, +- `baseTokenDecimals`:18, +- `quoteVault`:0x0000000000000000000000000000000000000000, +- `quoteVaultConversionSample`:1, +- `quoteFeed1`: 0xEe9F2375b4bdF6387aa8265dD4FB8F16512A1d46, +- `quoteFeed2`: 0x0000000000000000000000000000000000000000, +- `quoteTokenDecimals`:6, +- `salt`: , + +and for the sDAI/USDC oracle: + +- `baseVault`: 0x83f20f44975d03b1b09e64809b757c47f942beea, +- `baseVaultConversionSample`: 1e18, +- `baseFeed1`: 0xAed0c38402a5d19df6E4c03F4E2DceD6e29c1ee9, +- `baseFeed2`: 0x0000000000000000000000000000000000000000, +- `baseTokenDecimals`: 18, +- `quoteVault`: 0x0000000000000000000000000000000000000000, +- `quoteVaultConversionSample`: 1, +- `quoteFeed1`: 0x8fFfFfd4AfB6115b954Bd326cbe7B4BA576818f6, +- `quoteFeed2`: 0x0000000000000000000000000000000000000000, +- `quoteTokenDecimals`: 6, +- `salt`: , + +and for the wstETH/ETH oracle: + +- `baseVault`:0x0000000000000000000000000000000000000000, +- `baseVaultConversionSample`:1, +- `baseFeed1`:0x905b7dAbCD3Ce6B792D874e303D336424Cdb1421, +- `baseFeed2`:0x86392dC19c0b719886221c78AB11eb8Cf5c52812, +- `baseTokenDecimals`:18, +- `quoteVault`:0x0000000000000000000000000000000000000000, +- `quoteVaultConversionSample`:1, +- `quoteFeed1`:0x0000000000000000000000000000000000000000, +- `quoteFeed2`:0x0000000000000000000000000000000000000000, +- `quoteTokenDecimals`:18, +- `salt`: , ## Audits @@ -46,4 +106,4 @@ All audits are stored in the [audits](./audits/)' folder. ## License -Morpho Blue Oracles are licensed under `GPL-2.0-or-later`, see [`LICENSE`](./LICENSE). \ No newline at end of file +Morpho Blue Oracles are licensed under `GPL-2.0-or-later`, see [`LICENSE`](./LICENSE). From 5317d593d7324d72406091d19c4031dbb514b610 Mon Sep 17 00:00:00 2001 From: Reppelin Tom <75627352+tomrpl@users.noreply.github.com> Date: Wed, 6 Mar 2024 17:01:40 +0100 Subject: [PATCH 02/13] Update README.md Co-authored-by: Merlin Egalite <44097430+MerlinEgalite@users.noreply.github.com> Signed-off-by: Reppelin Tom <75627352+tomrpl@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fbfec79..570ef4f 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ The oracles implement the `IOracle` interface defined in [`IOracle.sol`](https:/ ## MorphoChainlinkOracleV2 -The `MorphoChainlinkOracleV2` is an oracle that uses Chainlink-compliant feeds to provide price data. +The `MorphoChainlinkOracleV2` is an oracle that uses Chainlink-interface-compliant feeds to provide price data. This oracle handles the following cases among others (let's say that our pair is A/B): From d9123d2fccc3975ab94137417d2344465489c315 Mon Sep 17 00:00:00 2001 From: Reppelin Tom <75627352+tomrpl@users.noreply.github.com> Date: Wed, 6 Mar 2024 17:01:55 +0100 Subject: [PATCH 03/13] Update README.md Co-authored-by: Merlin Egalite <44097430+MerlinEgalite@users.noreply.github.com> Signed-off-by: Reppelin Tom <75627352+tomrpl@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 570ef4f..140e56f 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ This oracle handles the following cases among others (let's say that our pair is ## WstETH/stETH Exchange Rate Adapter -A specific implementation, the WstEthStEthExchangeRateChainlinkAdapter, provides the exchange rate between wstETH and stETH using Chainlink. This adapter is designed for precise, decentralized price feeds on Ethereum, ensuring compatibility with the MorphoChainlinkOracleV2 for markets involving these assets. +A specific implementation, the `WstEthStEthExchangeRateChainlinkAdapter`, provides the exchange rate between wstETH and stETH. Deployed on Ethereum Mainnet, this adapter can be found in Ethereum Mainnet at the address [0x905b7dAbCD3Ce6B792D874e303D336424Cdb1421](https://etherscan.io/address/0x905b7dabcd3ce6b792d874e303d336424cdb1421#code). It's recommended for use as a reliable price feed source in Morpho oracles. From e1d5ade7e42cbc76d2a4a37a124752a7d5f17d53 Mon Sep 17 00:00:00 2001 From: Reppelin Tom <75627352+tomrpl@users.noreply.github.com> Date: Wed, 6 Mar 2024 17:02:05 +0100 Subject: [PATCH 04/13] Update README.md Co-authored-by: Merlin Egalite <44097430+MerlinEgalite@users.noreply.github.com> Signed-off-by: Reppelin Tom <75627352+tomrpl@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 140e56f..5ff6744 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ This oracle handles the following cases among others (let's say that our pair is A specific implementation, the `WstEthStEthExchangeRateChainlinkAdapter`, provides the exchange rate between wstETH and stETH. -Deployed on Ethereum Mainnet, this adapter can be found in Ethereum Mainnet at the address [0x905b7dAbCD3Ce6B792D874e303D336424Cdb1421](https://etherscan.io/address/0x905b7dabcd3ce6b792d874e303d336424cdb1421#code). It's recommended for use as a reliable price feed source in Morpho oracles. +Deployed on Ethereum Mainnet, this adapter can be found on Ethereum Mainnet at the address [0x905b7dAbCD3Ce6B792D874e303D336424Cdb1421](https://etherscan.io/address/0x905b7dabcd3ce6b792d874e303d336424cdb1421#code). ## MorphoChainlinkOracleV2Factory From 542333598c4ce421059161e25d138419946ebe0c Mon Sep 17 00:00:00 2001 From: Reppelin Tom <75627352+tomrpl@users.noreply.github.com> Date: Wed, 6 Mar 2024 17:02:16 +0100 Subject: [PATCH 05/13] Update README.md Co-authored-by: Merlin Egalite <44097430+MerlinEgalite@users.noreply.github.com> Signed-off-by: Reppelin Tom <75627352+tomrpl@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5ff6744..066805a 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Deployed on Ethereum Mainnet, this adapter can be found on Ethereum Mainnet at t The `MorphoChainlinkOracleV2Factory` is a factory that deploys `MorphoChainlinkOracleV2` instances. -The factory facilitates the easy creation and indexing of MorphoChainlinkOracleV2 oracles. Developed by Morpho Labs, this factory contract streamlines the process of deploying new oracles, catering to various market pairs without the need for deploying individual contracts manually for each pair. +The factory facilitates the easy creation and indexing of `MorphoChainlinkOracleV2` oracles. This factory contract streamlines the process of deploying new oracles, catering to various market pairs without the need for deploying individual contracts manually for each pair. ### Usage From 35431dbb31493a4fd42481b69ba23c6ca591ed68 Mon Sep 17 00:00:00 2001 From: Reppelin Tom <75627352+tomrpl@users.noreply.github.com> Date: Wed, 6 Mar 2024 17:02:28 +0100 Subject: [PATCH 06/13] Update README.md Co-authored-by: Merlin Egalite <44097430+MerlinEgalite@users.noreply.github.com> Signed-off-by: Reppelin Tom <75627352+tomrpl@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 066805a..78b611d 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ The factory facilitates the easy creation and indexing of `MorphoChainlinkOracle The Ethereum Mainnet address of this factory is [0x3A7bB36Ee3f3eE32A60e9f2b33c1e5f2E83ad766](https://etherscan.io/address/0x3a7bb36ee3f3ee32a60e9f2b33c1e5f2e83ad766#code). -To create a new `MorphoChainlinkOracleV2` oracle using the factory, call the createMorphoChainlinkOracleV2 function with the following parameters: +To create a new `MorphoChainlinkOracleV2` oracle using the factory, call the `createMorphoChainlinkOracleV2` function with the following parameters: - `baseVault`: The ERC4626 token vault for the base asset. - `baseVaultConversionSample`: A sample size for converting base vault units. From cc73a786ed1d9ab73a3d26b0945bd0f30654cb5c Mon Sep 17 00:00:00 2001 From: Reppelin Tom <75627352+tomrpl@users.noreply.github.com> Date: Wed, 6 Mar 2024 17:04:19 +0100 Subject: [PATCH 07/13] feat(readme): moving deployment section into the usage one --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 78b611d..38c6489 100644 --- a/README.md +++ b/README.md @@ -46,15 +46,7 @@ To create a new `MorphoChainlinkOracleV2` oracle using the factory, call the `cr - `quoteTokenDecimals`: Decimal precision of the quote asset. - `salt`: A unique identifier to create deterministic addresses for deployed oracles. -## Getting Started - -Install dependencies: `forge install` - -In a `.env` file, set `ETH_RPC_URL` to the URL of an Ethereum provider. - -Run test: `forge test` - -## Deploy an Oracle +### Deploy an Oracle To deploy a `MorphoChainlinkOracleV2` on the Ethereum mainnet, use the `MorphoChainlinkOracleV2Factory` to create a new oracle. @@ -100,6 +92,14 @@ and for the wstETH/ETH oracle: - `quoteTokenDecimals`:18, - `salt`: , +## Getting Started + +Install dependencies: `forge install` + +In a `.env` file, set `ETH_RPC_URL` to the URL of an Ethereum provider. + +Run test: `forge test` + ## Audits All audits are stored in the [audits](./audits/)' folder. From 7149c50e3b65a04f07ee51f334ac421d57fbb25c Mon Sep 17 00:00:00 2001 From: Reppelin Tom <75627352+tomrpl@users.noreply.github.com> Date: Wed, 6 Mar 2024 17:42:37 +0100 Subject: [PATCH 08/13] Update README.md Co-authored-by: Romain Milon Signed-off-by: Reppelin Tom <75627352+tomrpl@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 38c6489..07e5f2a 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ This oracle handles the following cases among others (let's say that our pair is ## WstETH/stETH Exchange Rate Adapter -A specific implementation, the `WstEthStEthExchangeRateChainlinkAdapter`, provides the exchange rate between wstETH and stETH. +A specific implementation, the `WstEthStEthExchangeRateChainlinkAdapter`, provides the exchange rate between wstETH and stETH as a Chainlink-interface-compliant feed. Deployed on Ethereum Mainnet, this adapter can be found on Ethereum Mainnet at the address [0x905b7dAbCD3Ce6B792D874e303D336424Cdb1421](https://etherscan.io/address/0x905b7dabcd3ce6b792d874e303d336424cdb1421#code). From d604179437fd553c79060364049675986627b0d5 Mon Sep 17 00:00:00 2001 From: Reppelin Tom <75627352+tomrpl@users.noreply.github.com> Date: Wed, 6 Mar 2024 17:43:01 +0100 Subject: [PATCH 09/13] Update README.md Co-authored-by: Romain Milon Signed-off-by: Reppelin Tom <75627352+tomrpl@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 07e5f2a..73465b5 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ This oracle handles the following cases among others (let's say that our pair is A specific implementation, the `WstEthStEthExchangeRateChainlinkAdapter`, provides the exchange rate between wstETH and stETH as a Chainlink-interface-compliant feed. -Deployed on Ethereum Mainnet, this adapter can be found on Ethereum Mainnet at the address [0x905b7dAbCD3Ce6B792D874e303D336424Cdb1421](https://etherscan.io/address/0x905b7dabcd3ce6b792d874e303d336424cdb1421#code). +This adapter is deployed on Ethereum Mainnet at the address [0x905b7dAbCD3Ce6B792D874e303D336424Cdb1421](https://etherscan.io/address/0x905b7dabcd3ce6b792d874e303d336424cdb1421#code). ## MorphoChainlinkOracleV2Factory From 96ddd3d5058eefa6e96e4834beb9ce89a9b94150 Mon Sep 17 00:00:00 2001 From: Reppelin Tom <75627352+tomrpl@users.noreply.github.com> Date: Wed, 6 Mar 2024 17:44:31 +0100 Subject: [PATCH 10/13] Update README.md Co-authored-by: Romain Milon Signed-off-by: Reppelin Tom <75627352+tomrpl@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 73465b5..2ef44af 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ This adapter is deployed on Ethereum Mainnet at the address [0x905b7dAbCD3Ce6B79 The `MorphoChainlinkOracleV2Factory` is a factory that deploys `MorphoChainlinkOracleV2` instances. -The factory facilitates the easy creation and indexing of `MorphoChainlinkOracleV2` oracles. This factory contract streamlines the process of deploying new oracles, catering to various market pairs without the need for deploying individual contracts manually for each pair. +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. ### Usage From 6fb7202e69434a7fc91ab36aae7b0a432ef6ed7a Mon Sep 17 00:00:00 2001 From: Reppelin Tom <75627352+tomrpl@users.noreply.github.com> Date: Wed, 6 Mar 2024 17:50:26 +0100 Subject: [PATCH 11/13] feat(readme): updating with json format --- README.md | 60 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 2ef44af..1eab8e3 100644 --- a/README.md +++ b/README.md @@ -52,45 +52,51 @@ To deploy a `MorphoChainlinkOracleV2` on the Ethereum mainnet, use the `MorphoCh Below are the arguments to fill for the creation of the WETH/USDT oracle: -- `baseVault`: 0x0000000000000000000000000000000000000000, -- `baseVaultConversionSample`:1, -- `baseFeed1`: 0x0000000000000000000000000000000000000000, -- `baseFeed2`: 0x0000000000000000000000000000000000000000, -- `baseTokenDecimals`:18, -- `quoteVault`:0x0000000000000000000000000000000000000000, -- `quoteVaultConversionSample`:1, -- `quoteFeed1`: 0xEe9F2375b4bdF6387aa8265dD4FB8F16512A1d46, -- `quoteFeed2`: 0x0000000000000000000000000000000000000000, -- `quoteTokenDecimals`:6, +```json +- `baseVault`: "0x0000000000000000000000000000000000000000", +- `baseVaultConversionSample`: 1, +- `baseFeed1`: "0x0000000000000000000000000000000000000000", +- `baseFeed2`: "0x0000000000000000000000000000000000000000", +- `baseTokenDecimals`: 18, +- `quoteVault`:"0x0000000000000000000000000000000000000000", +- `quoteVaultConversionSample`: 1, +- `quoteFeed1`: "0xEe9F2375b4bdF6387aa8265dD4FB8F16512A1d46", +- `quoteFeed2`: "0x0000000000000000000000000000000000000000", +- `quoteTokenDecimals`: 6, - `salt`: , +``` and for the sDAI/USDC oracle: -- `baseVault`: 0x83f20f44975d03b1b09e64809b757c47f942beea, -- `baseVaultConversionSample`: 1e18, -- `baseFeed1`: 0xAed0c38402a5d19df6E4c03F4E2DceD6e29c1ee9, -- `baseFeed2`: 0x0000000000000000000000000000000000000000, +```json +- `baseVault`: "0x83f20f44975d03b1b09e64809b757c47f942beea", +- `baseVaultConversionSample`: 1000000000000000000, // 1e18 +- `baseFeed1`: "0xAed0c38402a5d19df6E4c03F4E2DceD6e29c1ee9", +- `baseFeed2`: "0x0000000000000000000000000000000000000000", - `baseTokenDecimals`: 18, -- `quoteVault`: 0x0000000000000000000000000000000000000000, +- `quoteVault`: "0x0000000000000000000000000000000000000000", - `quoteVaultConversionSample`: 1, -- `quoteFeed1`: 0x8fFfFfd4AfB6115b954Bd326cbe7B4BA576818f6, -- `quoteFeed2`: 0x0000000000000000000000000000000000000000, +- `quoteFeed1`: "0x8fFfFfd4AfB6115b954Bd326cbe7B4BA576818f6", +- `quoteFeed2`: "0x0000000000000000000000000000000000000000", - `quoteTokenDecimals`: 6, - `salt`: , +``` and for the wstETH/ETH oracle: -- `baseVault`:0x0000000000000000000000000000000000000000, -- `baseVaultConversionSample`:1, -- `baseFeed1`:0x905b7dAbCD3Ce6B792D874e303D336424Cdb1421, -- `baseFeed2`:0x86392dC19c0b719886221c78AB11eb8Cf5c52812, -- `baseTokenDecimals`:18, -- `quoteVault`:0x0000000000000000000000000000000000000000, -- `quoteVaultConversionSample`:1, -- `quoteFeed1`:0x0000000000000000000000000000000000000000, -- `quoteFeed2`:0x0000000000000000000000000000000000000000, -- `quoteTokenDecimals`:18, +```json +- `baseVault`: "0x0000000000000000000000000000000000000000", +- `baseVaultConversionSample`: 1, +- `baseFeed1`: "0x905b7dAbCD3Ce6B792D874e303D336424Cdb1421", +- `baseFeed2`: "0x86392dC19c0b719886221c78AB11eb8Cf5c52812", +- `baseTokenDecimals`: 18, +- `quoteVault`: "0x0000000000000000000000000000000000000000", +- `quoteVaultConversionSample`: 1, +- `quoteFeed1`: "0x0000000000000000000000000000000000000000", +- `quoteFeed2`: "0x0000000000000000000000000000000000000000", +- `quoteTokenDecimals`: 18, - `salt`: , +``` ## Getting Started From 4f06bedad632eb1ebb83b9ad8ffd51afa716860d Mon Sep 17 00:00:00 2001 From: Reppelin Tom <75627352+tomrpl@users.noreply.github.com> Date: Thu, 7 Mar 2024 10:41:51 +0100 Subject: [PATCH 12/13] Update README.md Co-authored-by: Quentin Garchery Signed-off-by: Reppelin Tom <75627352+tomrpl@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1eab8e3..4b33891 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ The Ethereum Mainnet address of this factory is [0x3A7bB36Ee3f3eE32A60e9f2b33c1e To create a new `MorphoChainlinkOracleV2` oracle using the factory, call the `createMorphoChainlinkOracleV2` function with the following parameters: - `baseVault`: The ERC4626 token vault for the base asset. -- `baseVaultConversionSample`: A sample size for converting base vault units. +- `baseVaultConversionSample`: A sample amount for converting base vault units. - `baseFeed1`, `baseFeed2`: Chainlink-interface-compliant data feeds for the base asset. - `baseTokenDecimals`: Decimal precision of the base asset. - `quoteVault`: The ERC4626 token vault for the quote asset. From 7f7412ab9da8ea705a9c4c29d077af47745e66fb Mon Sep 17 00:00:00 2001 From: Reppelin Tom <75627352+tomrpl@users.noreply.github.com> Date: Thu, 7 Mar 2024 10:42:54 +0100 Subject: [PATCH 13/13] Apply suggestions from code review Co-authored-by: Quentin Garchery Signed-off-by: Reppelin Tom <75627352+tomrpl@users.noreply.github.com> --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4b33891..701cb3d 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ To create a new `MorphoChainlinkOracleV2` oracle using the factory, call the `cr - `baseFeed1`, `baseFeed2`: Chainlink-interface-compliant data feeds for the base asset. - `baseTokenDecimals`: Decimal precision of the base asset. - `quoteVault`: The ERC4626 token vault for the quote asset. -- `quoteVaultConversionSample`: A sample size for converting quote vault units. +- `quoteVaultConversionSample`: A sample amount for converting quote vault units. - `quoteFeed1`, `quoteFeed2`: Chainlink-interface-compliant data feeds for the quote asset. - `quoteTokenDecimals`: Decimal precision of the quote asset. - `salt`: A unique identifier to create deterministic addresses for deployed oracles. @@ -69,7 +69,7 @@ Below are the arguments to fill for the creation of the WETH/USDT oracle: and for the sDAI/USDC oracle: ```json -- `baseVault`: "0x83f20f44975d03b1b09e64809b757c47f942beea", +- `baseVault`: "0x83F20F44975D03b1b09e64809B757c47f942BEeA", - `baseVaultConversionSample`: 1000000000000000000, // 1e18 - `baseFeed1`: "0xAed0c38402a5d19df6E4c03F4E2DceD6e29c1ee9", - `baseFeed2`: "0x0000000000000000000000000000000000000000",