Fringe Interest Rate Model

Methods

DEFAULT_ADMIN_ROLE

function DEFAULT_ADMIN_ROLE() external view returns (bytes32)

Returns

Name
Type
Description

_0

bytes32

undefined

MODERATOR_ROLE

function MODERATOR_ROLE() external view returns (bytes32)

Returns

Name
Type
Description

_0

bytes32

undefined

borrowRate

function borrowRate() external view returns (uint256)

Returns

Name
Type
Description

_0

uint256

undefined

getBorrowRate

Calculates the current borrow rate per block

Parameters

Name
Type
Description

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

Name
Type
Description

_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

Name
Type
Description

role

bytes32

undefined

Returns

Name
Type
Description

_0

bytes32

undefined

getSupplyRate

Calculates the current supply interest rate per block

Parameters

Name
Type
Description

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

Name
Type
Description

_0

uint256

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

grandModerator

Parameters

Name
Type
Description

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

Name
Type
Description

role

bytes32

undefined

account

address

undefined

hasRole

Returns true if account has been granted role.

Parameters

Name
Type
Description

role

bytes32

undefined

account

address

undefined

Returns

Name
Type
Description

_0

bool

undefined

initialize

isInterestRateModel

Indicator that this is an InterestRateModel contract (for inspection)

Returns

Name
Type
Description

_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

Name
Type
Description

role

bytes32

undefined

account

address

undefined

revokeModerator

Parameters

Name
Type
Description

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

Name
Type
Description

role

bytes32

undefined

account

address

undefined

setBorrowRate

Parameters

Name
Type
Description

newBorrowRate

uint256

undefined

setSupplyRate

Parameters

Name
Type
Description

newSupplyRate

uint256

undefined

supplyRate

Returns

Name
Type
Description

_0

uint256

undefined

supportsInterface

See {IERC165-supportsInterface}.

Parameters

Name
Type
Description

interfaceId

bytes4

undefined

Returns

Name
Type
Description

_0

bool

undefined

Events

RoleAdminChanged

Parameters

Name
Type
Description

role indexed

bytes32

undefined

previousAdminRole indexed

bytes32

undefined

newAdminRole indexed

bytes32

undefined

RoleGranted

Parameters

Name
Type
Description

role indexed

bytes32

undefined

account indexed

address

undefined

sender indexed

address

undefined

RoleRevoked

Parameters

Name
Type
Description

role indexed

bytes32

undefined

account indexed

address

undefined

sender indexed

address

undefined

Last updated