JumpRateModelV3
Overview
License: MIT
V3 interest rate Model.
Structs info
BlendingTokenInfo
RateInfo
Events info
NewInterestParams
Emitted when the owner of the interest rate model is updated.
Parameters:
NewOwner
Emitted when the owner of the contract is updated.
Parameters:
NewInterest
Emitted when a new interest rate is set.
Parameters:
Constants info
MODERATOR_ROLE (0x797669c9)
State variables info
blocksPerYear (0xa385fb96)
The approximate number of blocks per year that is assumed by the interest rate model.
blendingTokenInfo (0x582d785a)
rateInfo (0x3a86fb41)
isBlendingTokenSupport (0xb7979487)
Modifiers info
onlyBlendingToken
Modifier to restrict access to only the blending token contract.
onlyAdmin
Modifier to check if the caller is the default admin role.
onlyModerator
Modifier to check if the caller has the moderator role.
Functions info
initialize (0xfe4b84df)
Constructs an interest rate model.
Parameters:
grantModerator (0x6981c7ae)
Grants the MODERATOR_ROLE
to a new address. The caller must have the ADMIN_ROLE
.
Parameters:
revokeModerator (0x36445636)
Revokes the moderator role from the specified address. The caller must have the admin role.
Parameters:
updateJumpRateModel (0x10b86276)
Updates the parameters of the interest rate model (only callable by owner, i.e. Timelock). Only the contract moderator can call this function.
Parameters:
setBlockPerYear (0x03700d6b)
Sets the number of blocks per year for the JumpRateModelV3 contract. Only the contract moderator can call this function.
Parameters:
addBLendingTokenSupport (0xf9828944)
Adds support for a new blending token to the JumpRateModelV3 contract.
Requirements:
blendingToken
cannot be the zero address.Only the contract moderator can call this function.
Parameters:
removeBLendingTokenSupport (0xff60fb68)
Removes blending token support for the specified blending token address.
Requirements:
_blending
cannot be the zero address._blending
must be a supported blending token.
Parameters:
setMaxBorrowRate (0xa8801029)
Sets the maximum borrow rate for a blending token.
Requirements:
The caller must have the
onlyModerator
modifier.The blending token must be supported by the contract.
Parameters:
updateBlockNumber (0x938c9cf6)
Updates the block number for a given blending token.
Requirements:
The caller must have the
onlyModerator
modifier.The blending token must be supported.
Parameters:
utilizationRate (0x6e71e2d8)
Calculates the utilization rate of the market: borrows / (cash + borrows - reserves)
.
Parameters:
Return values:
getInterestRateChange (0x86959d81)
Calculates the change in the interest rate per block per block.
Parameters:
Return values:
getBlockNumber (0x42cbb15c)
Function to simply retrieve block number. This exists mainly for inheriting test contracts to stub this result.
storeBorrowRate (0x5eeaafea)
Calculates and stores the current borrow interest rate per block for the specified blending token.
Parameters:
Return values:
getSupplyRate (0x32dc9b1c)
Calculates the current supply rate per block.
Parameters:
Return values:
getBorrowRate (0x89469df9)
Calculates the current borrow rate per block.
Parameters:
Return values:
Last updated