Underlying Balance
The user's underlying balance is representing their assets in the protocol, is equal to the user's qToken balance multiplied by the Exchange Rate.
function underlyingBalanceOf(address account) external view returns (uint);
- account: The account to get the underlying balance of.
- RETURN: The amount of underlying currently owned by the account
QToken qToken = QToken(<qTokenAddress>);
uint balance = qToken.underlyingBalanceOf(<accountAddress>);
const qToken = await ethers.getContractAt(<qTokenABI>, <qTokenAddress>);
const balance = await qToken.underlyingBalanceOf(<accountAddress>);
Last modified 2yr ago