Borrow Balance

A user who borrows assets from the protocol is subject to accumulated interest based on the current borrow rate. Interest is accumulated every block and integrations may use this function to obtain the current value of a user's borrow balance with interest.

OErc20 / OEther

function borrowBalanceCurrent(address account) returns (uint)
  • account: The account which borrowed the assets.

  • RETURN: The user's current borrow balance (with interest) in units of the underlying asset.

Solidity

OErc20 oToken = OToken(0x3FDA...);
uint borrows = oToken.borrowBalanceCurrent(msg.caller);

Web3 1.0

const oToken = OEther.at(0x3FDB...);
const borrows = await oToken.methods.borrowBalanceCurrent(account).call();

Last updated