Function: setBorrowerDebtCeiling(address borrower, uint256 newDebtCeiling)
Allows the caller who has access to this function to update debtCeiling
for borrower. This also initiates the update process of borrower's interest rate as a result of changing the current borrower's utilization ratio.
Inputs
borrower
Constraints: If
_borrowersSet
does not containborrower
, the_getBorrowerConfig
function reverts.Impact: The address of existing borrower.
newDebtCeiling
Constraints: No constraints.
Impact: The debt limit — if the debt balance of the borrower is more than
debtCeiling
, the_availableToBorrow
returns zero. Also, it affects the borrower's utilization ratio.
Branches and code coverage
Intended branches
New borrower's interest rate was calculated properly.
Borrower's
debtCeiling
was updated properly.
Negative behavior
Non-whitelisted caller
The borrower has not been added before.