DefaultReserveInterestRateStrategy
Implements the calculation of the interest rates depending on the reserve state
_The model of interest rate is based on 2 slopes, one before the OPTIMAL_USAGE_RATIO
point of usage and another from that one to 100%.
An instance of this same contract, can't be used across different ParaSpace markets, due to the caching of the PoolAddressesProvider_
OPTIMAL_USAGE_RATIO
This constant represents the usage ratio at which the pool aims to obtain most competitive borrow rates. Expressed in ray
MAX_EXCESS_USAGE_RATIO
This constant represents the excess usage ratio above the optimal. It's always equal to 1-optimal usage ratio. Added as a constant here for gas optimizations. Expressed in ray
ADDRESSES_PROVIDER
_baseVariableBorrowRate
_variableRateSlope1
_variableRateSlope2
constructor
Constructor.
Parameters
getVariableRateSlope1
Returns the variable rate slope below optimal usage ratio
Its the variable rate when usage ratio > 0 and <= OPTIMAL_USAGE_RATIO
Return Values
getVariableRateSlope2
Returns the variable rate slope above optimal usage ratio
Its the variable rate when usage ratio > OPTIMAL_USAGE_RATIO
Return Values
getBaseVariableBorrowRate
Returns the base variable borrow rate
Return Values
getMaxVariableBorrowRate
Returns the maximum variable borrow rate
Return Values
CalcInterestRatesLocalVars
calculateInterestRates
Calculates the interest rates depending on the reserve's state and configurations