Developers
Search…
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

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

Solidity

1
QToken qToken = QToken(<qTokenAddress>);
2
uint borrow = qToken.totalBorrow();
Copied!

Ethers.js

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