Developers
Search…
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();
Copy link
On this page
QToken
Solidity
Ethers.js