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

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

Solidity

1
QToken qToken = QToken(<qTokenAddress>);
2
uint supplyRate = qToken.supplyRatePerSec();
Copied!

Ethers.js

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