Total Borrow

Total Borrows is the amount of underlying currently loaned out by the market, and the amount upon which interest is accumulated to suppliers of the market.

QToken

function totalBorrow() external view returns (uint);
  • RETURN: The total amount of borrowed underlying, with interest.

Solidity

QToken qToken = QToken(<qTokenAddress>);
uint borrow = qToken.totalBorrow();

Ethers.js

const qToken = await ethers.getContractAt(<qTokenABI>, <qTokenAddress>);
const borrow = await qToken.totalBorrow();

Last updated