Assessment reports>Origami Finance>Threat Model>preCheck

Function: preCheck(address, uint256 amount)

The function can be called only by a proxy contract, which is set during deployment and cannot be changed. Allows to verify that the new amount does not exceed the cap in the ongoing period. The function is invoked through a proxy OrigamiCircuitBreakerProxy.preCheck() function, which is, in turn, called by OrigamiLendingClerk.borrow() and OrigamiLendingSupplyManager.exitToToken().

Inputs

  • amount

    • Constraints: The number of tokens to be checked should not exceed the overall limit.

    • Impact: If this value does not exceed the cap, it will be added to the current time bucket for future cap verification.

Branches and code coverage

Intended branches

  • The previous bucket was reset as expected.

  • The current bucket was updated properly.

Negative behavior

  • Caller is not proxy contract.

  • The amount exceeds the cap.

Zellic © 2025Back to top ↑