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 containborrower
, the_getBorrowerConfig
function reverts.Impact: The address of the existing borrower.
interestRateModel
Impact: The address of the interest rate model — the
calculateInterestRate
function of theinterestRateModel
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.