Skip to content

Commit fac4ba1

Browse files
committed
docs: update comments for the refactor
1 parent 08373a0 commit fac4ba1

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/ChainlinkOracle.sol

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,10 @@ contract ChainlinkOracle is IOracle {
4949
uint256 baseTokenDecimals,
5050
uint256 quoteTokenDecimals
5151
) {
52+
// The vault parameter is used for ERC4626 tokens, to price its shares.
53+
// It is used to price a full unit of the vault shares, so it requires dividing by that number, hence the
54+
// `VAULT_DECIMALS` subtraction in the following `SCALE_FACTOR` definition.
5255
VAULT = vault;
53-
// TODO: adapt this
54-
// This scale factor is defined similarly to the scale factor of the ChainlinkOracle, except:
55-
// - the oracle only has one base feed and one quote feed
56-
// - it is used to price a full unit of the vault shares, so it requires dividing by that number, hence the
57-
// `VAULT_DECIMALS` subtraction
5856
VAULT_DECIMALS = VAULT.getDecimals();
5957
BASE_FEED_1 = baseFeed1;
6058
BASE_FEED_2 = baseFeed2;

src/libraries/VaultLib.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {ERC4626Interface} from "../interfaces/ERC4626Interface.sol";
66
/// @title ChainlinkDataFeedLib
77
/// @author Morpho Labs
88
/// @custom:contact [email protected]
9-
/// @notice Library exposing functions to interact with a Chainlink-compliant feed.
9+
/// @notice Library exposing functions to price shares of an ERC4626 vault.
1010
library VaultLib {
1111
/// @dev Converts `shares` into the corresponding assets on the `vault`.
1212
/// @dev When `vault` is the address zero, returns 1.

0 commit comments

Comments
 (0)