InterestRateModel
The interest rate model used by UTokens
BORROW_RATE_MAX_MANTISSA
uint256 BORROW_RATE_MAX_MANTISSAMaximum borrow rate that can ever be applied (0.005% / block)
interestRatePerBlock
uint256 interestRatePerBlockIInterest 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_) publicgetBorrowRate
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
Name
Type
Description
reserveFactorMantissa
uint256
The reserve factor (scaled)
setInterestRate
function setInterestRate(uint256 _interestRatePerBlock) externalSet new interest rate per block Interest rate per block must be less than the max rate 0.005% / block
Parameters
Name
Type
Description
_interestRatePerBlock
uint256
Interest rate
Last updated
Was this helpful?