Assessment reports>Origami Finance>Threat Model>setBorrowerInterestRateModel

Function: setBorrowerInterestRateModel(address borrower, address interestRateModel)

Allows the caller who has access to this function to update the interest rate model contract address for the borrower.

Inputs

  • borrower

    • Constraints: If _borrowersSet does not contain borrower, the _getBorrowerConfig function reverts.

    • Impact: The address of the existing borrower.

  • interestRateModel

    • Impact: The address of the interest rate model — the calculateInterestRate function of the interestRateModel contract returns the latest interest rate calculated using the current utilization ratio.

Branches and code coverage

Intended branches

  • New borrower's interest rate was calculated according to the new model.

Negative behavior

  • Non-whitelisted caller

  • The borrower has not been added before.

  • The interestRateModel is zero address.

Zellic © 2025Back to top ↑