From 8e788b2b56e7826a3792bd8c04c3680ef7e4dec2 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 25 Aug 2022 23:18:02 +0200 Subject: [PATCH] Fix in documentation description - details about number of decimals in returned value. - exchangeRateCurrent() - exchangeRateStored() - exchangeRateStoredInternal() --- contracts/CToken.sol | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contracts/CToken.sol b/contracts/CToken.sol index b8c878c79..aacfceffc 100644 --- a/contracts/CToken.sol +++ b/contracts/CToken.sol @@ -269,7 +269,7 @@ abstract contract CToken is CTokenInterface, ExponentialNoError, TokenErrorRepor /** * @notice Accrue interest then return the up-to-date exchange rate - * @return Calculated exchange rate scaled by 1e18 + * @return Calculated exchange rate scaled by 10**(Underlying Token Decimals + 18 - CToken Decimals) */ function exchangeRateCurrent() override public nonReentrant returns (uint) { accrueInterest(); @@ -279,7 +279,7 @@ abstract contract CToken is CTokenInterface, ExponentialNoError, TokenErrorRepor /** * @notice Calculates the exchange rate from the underlying to the CToken * @dev This function does not accrue interest before calculating the exchange rate - * @return Calculated exchange rate scaled by 1e18 + * @return Calculated exchange rate scaled by 10**(Underlying Token Decimals + 18 - CToken Decimals) */ function exchangeRateStored() override public view returns (uint) { return exchangeRateStoredInternal(); @@ -288,7 +288,7 @@ abstract contract CToken is CTokenInterface, ExponentialNoError, TokenErrorRepor /** * @notice Calculates the exchange rate from the underlying to the CToken * @dev This function does not accrue interest before calculating the exchange rate - * @return calculated exchange rate scaled by 1e18 + * @return calculated exchange rate scaled by 10**(Underlying Token Decimals + 18 - CToken Decimals) */ function exchangeRateStoredInternal() virtual internal view returns (uint) { uint _totalSupply = totalSupply;