Assessment reports>Origami Finance>Threat Model>addBorrower

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

  • borrower

    • Constraints: Cannot be zero address — should not be already added.

    • Impact: The borrower address.

  • interestRateModel

    • Constraints: Cannot be zero address.

    • Impact: The address of the interest rate model; the calculateInterestRate function of the contract returns the latest borrower-specific interest rate.

  • debtCeiling

    • Constraints: No constraints.

    • Impact: The debt limit — if the debt balance of the borrower is more than debtCeiling, the _availableToBorrow returns zero.

Branches and code coverage

Intended branches

  • borrowerConfig was updated.

  • New borrower was added.

Negative behavior

  • Non-whitelisted caller

  • Borrower was already added.

  • borrower is zero address

  • interestRateModel is zero address

Zellic © 2025Back to top ↑