You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
exchangeRateStoredInternal does not seem to take the underlying asset into account (it uses Exponential.getExp, but that also states 18 decimal precision). Is the documentation just wrong or am I misunderstanding something?
The text was updated successfully, but these errors were encountered:
To make the answer short, documentation is correct here.
To clarify, for the case of DAI/cDAI exchangeRateCurrent() is 28 decimal fixed-point number
18 - 8 + 18 = 28 as in this case Underlying Token Decimals is 18(DAI)
The documentation in https://compound.finance/docs/ctokens#exchange-rate states the following:
However the source code at CToken intialExchangeRateMantissa, CToken and CErc20Delegator states it is fixed at 18 decimal digits.
exchangeRateStoredInternal
does not seem to take the underlying asset into account (it usesExponential.getExp
, but that also states 18 decimal precision). Is the documentation just wrong or am I misunderstanding something?The text was updated successfully, but these errors were encountered: