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
On this page
  • QToken
  • Solidity
  • Ethers.js

Was this helpful?

  1. QTokens

Supply Rate

At any point in time one may query the contract to get the current supply rate per second. The supply rate is derived from the borrow rate, reserve factor and the amount of total borrows.

QToken

function supplyRatePerSec() external view returns (uint);
  • RETURN: The current supply rate as an unsigned integer, scaled by 1e18.

Solidity

QToken qToken = QToken(<qTokenAddress>);
uint supplyRate = qToken.supplyRatePerSec();

Ethers.js

const qToken = await ethers.getContractAt(<qTokenABI>, <qTokenAddress>);
const supplyRate = await qToken.supplyRatePerSec();
PreviousBorrow RateNextTotal Reserve

Last updated 3 years ago

Was this helpful?