Earn Interest Rate Model (AlkemiRateModel.sol)
View Source: contracts/AlkemiRateModel.sol
↗ Extends: Exponential
See Model here
Enums
IRError
Contract Members
Constants & Variables
Events
Modifiers
onlyOwner
onlyOwner
Arguments
Name
Type
Description
Functions
changeRates(string _contractName, uint256 MinRate, uint256 HealthyMinUR, uint256 HealthyMinRate, uint256 HealthyMaxUR, uint256 HealthyMaxRate, uint256 MaxRate)
changeBlocksPerYear(uint256 _blocksPerYear)
transferOwnership(address newOwner_)
acceptOwnership()
getUtilizationRate(uint256 cash, uint256 borrows)
getUtilizationAndAnnualBorrowRate(uint256 cash, uint256 borrows)
getSupplyRate(address _asset, uint256 cash, uint256 borrows)
getBorrowRate(address asset, uint256 cash, uint256 borrows)
changeRates
Arguments
Name
Type
Description
_contractName
string
MinRate
uint256
HealthyMinUR
uint256
HealthyMinRate
uint256
HealthyMaxUR
uint256
HealthyMaxRate
uint256
MaxRate
uint256
changeBlocksPerYear
Arguments
Name
Type
Description
_blocksPerYear
uint256
transferOwnership
Arguments
Name
Type
Description
newOwner_
address
acceptOwnership
Arguments
Name
Type
Description
getUtilizationRate
Arguments
Name
Type
Description
cash
uint256
borrows
uint256
getUtilizationAndAnnualBorrowRate
Arguments
Name
Type
Description
cash
uint256
borrows
uint256
getSupplyRate
Gets the current supply interest rate based on the given asset, total cash and total borrows
Returns
Success or failure and the supply interest rate per block scaled by 1e18
Arguments
Name
Type
Description
_asset
address
The asset to get the interest rate of
cash
uint256
The total cash of the asset in the market
borrows
uint256
The total borrows of the asset in the market
getBorrowRate
Gets the current borrow interest rate based on the given asset, total cash and total borrows
Returns
Success or failure and the borrow interest rate per block scaled by 1e18
Arguments
Name
Type
Description
asset
address
The asset to get the interest rate of
cash
uint256
The total cash of the asset in the market
borrows
uint256
The total borrows of the asset in the market
Last updated
Was this helpful?