InterestRateModel

Calculate the borrowers' interest rate.

Functions:

isInterestRateModel() → bool

Check to see if it is a valid interest rate model

Return Values:

  • Return true for a valid interest rate model

getBorrowRate() → uint256

Calculates the current borrow interest rate per block

Return Values:

  • The borrow rate per block (as a percentage, and scaled by 1e18)

getSupplyRate(uint256 reserveFactorMantissa) → uint256

Calculates the current suppier interest rate per block

Return Values:

  • The supply rate per block (as a percentage, and scaled by 1e18)

setInterestRate(uint256 interestRatePerBlock_)

Set the borrow interest rate per block

Events:

LogNewInterestParams(uint256 interestRate)

Update interest parameters event

Parameters:

  • interestRate: New interest rate, 1e18 = 100%