Function: setRateParams(uint80 _baseInterestRate, uint80 _maxInterestRate, uint256 _kinkUtilizationRatio, uint80 _kinkInterestRate)
This function allows the caller with access to update the rate parameters.
Inputs
_baseInterestRateConstraints:
_baseInterestRateshould be less than_kinkInterestRate.Impact: Base interest rate, which is used for calculating the current interest rate in case
utilizationRatiois less than or equal to thekinkUtilizationRatio.
_maxInterestRateConstraints: It should neither be more than
_kinkInterestRateor_baseInterestRate.Impact: This rate represents the interest rate applied when the utilization reaches 100%.
_kinkUtilizationRatioConstraints: 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
_kinkInterestRatewhenutilizationRatiois more than_kinkUtilizationRatio.
_kinkInterestRateConstraints:
_kinkInterestRateshould be less than_maxInterestRateand 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