Assessment reports>Origami Finance>Threat Model>setRateParams

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 the kinkUtilizationRatio.

  • _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 when utilizationRatio 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

Zellic © 2025Back to top ↑