Function: addBorrower(address borrower, address interestRateModel, uint256 debtCeiling)
Allows the caller who has access to this function to add new borrower and borrow configuration for them.
Inputs
borrowerConstraints: Cannot be zero address — should not be already added.
Impact: The borrower address.
interestRateModelConstraints: Cannot be zero address.
Impact: The address of the interest rate model; the
calculateInterestRatefunction of the contract returns the latest borrower-specific interest rate.
debtCeilingConstraints: No constraints.
Impact: The debt limit — if the debt balance of the borrower is more than
debtCeiling, the_availableToBorrowreturns zero.
Branches and code coverage
Intended branches
borrowerConfigwas updated.New borrower was added.
Negative behavior
Non-whitelisted caller
Borrower was already added.
borroweris zero addressinterestRateModelis zero address