Fringe Interest Rate Model
Methods
DEFAULT_ADMIN_ROLE
Returns
_0
bytes32
undefined
MODERATOR_ROLE
Returns
_0
bytes32
undefined
borrowRate
Returns
_0
uint256
undefined
getBorrowRate
Calculates the current borrow rate per block
Parameters
cash
uint256
The amount of cash in the market
borrows
uint256
The amount of borrows in the market
reserves
uint256
The amount of reserves in the market
Returns
_0
uint256
The borrow rate percentage per block as a mantissa (scaled by 1e18)
getRoleAdmin
Returns the admin role that controls role
. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.
Parameters
role
bytes32
undefined
Returns
_0
bytes32
undefined
getSupplyRate
Calculates the current supply interest rate per block
Parameters
cash
uint256
The total amount of cash the market has
borrows
uint256
The total amount of borrows the market has outstanding
reserves
uint256
The total amount of reserves the market has
reserveFactorMantissa
uint256
The current reserve factor the market has
Returns
_0
uint256
The supply rate per block (as a percentage, and scaled by 1e18)
grandModerator
Parameters
newModerator
address
undefined
grantRole
Grants role
to account
. If account
had not been already granted role
, emits a {RoleGranted} event. Requirements: - the caller must have role
's admin role.
Parameters
role
bytes32
undefined
account
address
undefined
hasRole
Returns true
if account
has been granted role
.
Parameters
role
bytes32
undefined
account
address
undefined
Returns
_0
bool
undefined
initialize
isInterestRateModel
Indicator that this is an InterestRateModel contract (for inspection)
Returns
_0
bool
undefined
renounceRole
Revokes role
from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted role
, emits a {RoleRevoked} event. Requirements: - the caller must be account
.
Parameters
role
bytes32
undefined
account
address
undefined
revokeModerator
Parameters
moderator
address
undefined
revokeRole
Revokes role
from account
. If account
had been granted role
, emits a {RoleRevoked} event. Requirements: - the caller must have role
's admin role.
Parameters
role
bytes32
undefined
account
address
undefined
setBorrowRate
Parameters
newBorrowRate
uint256
undefined
setSupplyRate
Parameters
newSupplyRate
uint256
undefined
supplyRate
Returns
_0
uint256
undefined
supportsInterface
See {IERC165-supportsInterface}.
Parameters
interfaceId
bytes4
undefined
Returns
_0
bool
undefined
Events
RoleAdminChanged
Parameters
role indexed
bytes32
undefined
previousAdminRole indexed
bytes32
undefined
newAdminRole indexed
bytes32
undefined
RoleGranted
Parameters
role indexed
bytes32
undefined
account indexed
address
undefined
sender indexed
address
undefined
RoleRevoked
Parameters
role indexed
bytes32
undefined
account indexed
address
undefined
sender indexed
address
undefined
Last updated