Function: setRateParams(uint80 _baseInterestRate, uint80 _maxInterestRate, uint256 _kinkUtilizationRatio, uint80 _kinkInterestRate)
This function allows the caller with access to update the rate parameters.
Inputs
_baseInterestRate
Constraints:
_baseInterestRate
should be less than_kinkInterestRate
.Impact: Base interest rate, which is used for calculating the current interest rate in case
utilizationRatio
is less than or equal to thekinkUtilizationRatio
.
_maxInterestRate
Constraints: It should neither be more than
_kinkInterestRate
or_baseInterestRate
.Impact: This rate represents the interest rate applied when the utilization reaches 100%.
_kinkUtilizationRatio
Constraints: It should neither be equal to zero nor less than
PRECISION
.Impact: The utilization level at which the slope of the curve shifts. The current interest rate will be calculated using
_kinkInterestRate
whenutilizationRatio
is more than_kinkUtilizationRatio
.
_kinkInterestRate
Constraints:
_kinkInterestRate
should be less than_maxInterestRate
and more than_baseInterestRate
.Impact: Interest rate at the
kinkUtilization
.
Branches and code coverage
Intended branches
The new parameters have been set successfully
Negative behavior
Non-whitelisted caller
Set invalid rate params