Skip to content

Commit

Permalink
docs: update comments for the refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
QGarchery committed Oct 9, 2023
1 parent 08373a0 commit fac4ba1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions src/ChainlinkOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,10 @@ contract ChainlinkOracle is IOracle {
uint256 baseTokenDecimals,
uint256 quoteTokenDecimals
) {
// The vault parameter is used for ERC4626 tokens, to price its shares.
// It is used to price a full unit of the vault shares, so it requires dividing by that number, hence the
// `VAULT_DECIMALS` subtraction in the following `SCALE_FACTOR` definition.
VAULT = vault;
// TODO: adapt this
// This scale factor is defined similarly to the scale factor of the ChainlinkOracle, except:
// - the oracle only has one base feed and one quote feed
// - it is used to price a full unit of the vault shares, so it requires dividing by that number, hence the
// `VAULT_DECIMALS` subtraction
VAULT_DECIMALS = VAULT.getDecimals();
BASE_FEED_1 = baseFeed1;
BASE_FEED_2 = baseFeed2;
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/VaultLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {ERC4626Interface} from "../interfaces/ERC4626Interface.sol";
/// @title ChainlinkDataFeedLib
/// @author Morpho Labs
/// @custom:contact [email protected]
/// @notice Library exposing functions to interact with a Chainlink-compliant feed.
/// @notice Library exposing functions to price shares of an ERC4626 vault.
library VaultLib {
/// @dev Converts `shares` into the corresponding assets on the `vault`.
/// @dev When `vault` is the address zero, returns 1.
Expand Down

0 comments on commit fac4ba1

Please sign in to comment.