Developers
Search…
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.

QToken

1
function underlyingBalanceOf(address account) external view returns (uint);
Copied!
  • account: The account to get the underlying balance of.
  • RETURN: The amount of underlying currently owned by the account

Solidity

1
QToken qToken = QToken(<qTokenAddress>);
2
uint balance = qToken.underlyingBalanceOf(<accountAddress>);
Copied!

Ethers.js

1
const qToken = await ethers.getContractAt(<qTokenABI>, <qTokenAddress>);
2
const balance = await qToken.underlyingBalanceOf(<accountAddress>);
Copied!
Last modified 2mo ago
Copy link