Developers
Search…
Developers
Introduction
QTokens
Transfer
Total Supply
Underlying Balance
Exchange Rate
Get Cash
Total Borrow
Borrow Balance
Borrow Rate
Supply Rate
Total Reserve
Reserve Factor
Key Events
Qore
Market List
Enter Markets
Exit Markets
Get Markets In
Supply
Redeem with QToken
Redeem with Underlying
Borrow
Repay Borrow
Repay Borrow Behalf
Liquidate Borrow
Get Account Liquidity
Market Information
Close Factor
Liquidation Incentive
Qubit Distribution Speeds
Pending Qubit (or Accrued Qubit)
Claim Qubit
Key Events
Qubit Locker
qScore
Total qScore
Deposit
Locked Balance
Locked Period
Extend Lock Period
Unlocked Balance
Withdraw
Powered By
GitBook
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!
QTokens - Previous
Total Supply
Next - QTokens
Exchange Rate
Last modified
8mo ago
Copy link
Contents
QToken
Solidity
Ethers.js