Fringe Interest Rate Model

Methods

DEFAULT_ADMIN_ROLE

function DEFAULT_ADMIN_ROLE() external view returns (bytes32)

Returns

NameTypeDescription

_0

bytes32

undefined

MODERATOR_ROLE

function MODERATOR_ROLE() external view returns (bytes32)

Returns

NameTypeDescription

_0

bytes32

undefined

borrowRate

function borrowRate() external view returns (uint256)

Returns

NameTypeDescription

_0

uint256

undefined

getBorrowRate

function getBorrowRate(uint256 cash, uint256 borrows, uint256 reserves) external view returns (uint256)

Calculates the current borrow rate per block

Parameters

NameTypeDescription

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

NameTypeDescription

_0

uint256

The borrow rate percentage per block as a mantissa (scaled by 1e18)

getRoleAdmin

function getRoleAdmin(bytes32 role) external view returns (bytes32)

Returns the admin role that controls role. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.

Parameters

NameTypeDescription

role

bytes32

undefined

Returns

NameTypeDescription

_0

bytes32

undefined

getSupplyRate

function getSupplyRate(uint256 cash, uint256 borrows, uint256 reserves, uint256 reserveFactorMantissa) external view returns (uint256)

Calculates the current supply interest rate per block

Parameters

NameTypeDescription

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

NameTypeDescription

_0

uint256

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

grandModerator

function grandModerator(address newModerator) external nonpayable

Parameters

NameTypeDescription

newModerator

address

undefined

grantRole

function grantRole(bytes32 role, address account) external nonpayable

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

NameTypeDescription

role

bytes32

undefined

account

address

undefined

hasRole

function hasRole(bytes32 role, address account) external view returns (bool)

Returns true if account has been granted role.

Parameters

NameTypeDescription

role

bytes32

undefined

account

address

undefined

Returns

NameTypeDescription

_0

bool

undefined

initialize

function initialize() external nonpayable

isInterestRateModel

function isInterestRateModel() external view returns (bool)

Indicator that this is an InterestRateModel contract (for inspection)

Returns

NameTypeDescription

_0

bool

undefined

renounceRole

function renounceRole(bytes32 role, address account) external nonpayable

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

NameTypeDescription

role

bytes32

undefined

account

address

undefined

revokeModerator

function revokeModerator(address moderator) external nonpayable

Parameters

NameTypeDescription

moderator

address

undefined

revokeRole

function revokeRole(bytes32 role, address account) external nonpayable

Revokes role from account. If account had been granted role, emits a {RoleRevoked} event. Requirements: - the caller must have role's admin role.

Parameters

NameTypeDescription

role

bytes32

undefined

account

address

undefined

setBorrowRate

function setBorrowRate(uint256 newBorrowRate) external nonpayable

Parameters

NameTypeDescription

newBorrowRate

uint256

undefined

setSupplyRate

function setSupplyRate(uint256 newSupplyRate) external nonpayable

Parameters

NameTypeDescription

newSupplyRate

uint256

undefined

supplyRate

function supplyRate() external view returns (uint256)

Returns

NameTypeDescription

_0

uint256

undefined

supportsInterface

function supportsInterface(bytes4 interfaceId) external view returns (bool)

See {IERC165-supportsInterface}.

Parameters

NameTypeDescription

interfaceId

bytes4

undefined

Returns

NameTypeDescription

_0

bool

undefined

Events

RoleAdminChanged

event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole)

Parameters

NameTypeDescription

role indexed

bytes32

undefined

previousAdminRole indexed

bytes32

undefined

newAdminRole indexed

bytes32

undefined

RoleGranted

event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender)

Parameters

NameTypeDescription

role indexed

bytes32

undefined

account indexed

address

undefined

sender indexed

address

undefined

RoleRevoked

event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender)

Parameters

NameTypeDescription

role indexed

bytes32

undefined

account indexed

address

undefined

sender indexed

address

undefined

Last updated