InterestRateModel

The interest rate model used by UTokens

BORROW_RATE_MAX_MANTISSA

uint256 BORROW_RATE_MAX_MANTISSA

Maximum borrow rate that can ever be applied (0.005% / block)

interestRatePerBlock

uint256 interestRatePerBlock

IInterest rate per block

ReserveFactorExceeded

error ReserveFactorExceeded()

BorrowRateExceeded

error BorrowRateExceeded()

LogNewInterestParams

event LogNewInterestParams(uint256 interestRate)

@dev Update interest parameters event @param interestRate New interest rate, 1e18 = 100%

constructor

constructor(uint256 interestRatePerBlock_) public

getBorrowRate

function getBorrowRate() public view returns (uint256)

Get borrow rate per block

getSupplyRate

function getSupplyRate(uint256 reserveFactorMantissa) public view returns (uint256)

Get supply rate for given reserve factor If reserve factor is 100% interest acrues to the reserves If reserves factor is 0 interest acrues to uDAI minters

Parameters

setInterestRate

function setInterestRate(uint256 _interestRatePerBlock) external

Set new interest rate per block Interest rate per block must be less than the max rate 0.005% / block

Parameters

Last updated