Assessment reports>Origami Finance>Threat Model>preCheck

Function: preCheck(address token, address onBehalfOf, uint256 amount)

Performs a circuit breaker check, calling the correct circuit breaker.

Inputs

  • token

    • Control: Full.

    • Constraints: None.

    • Impact: The token that is being transferred.

  • onBehalfOf

    • Control: Full.

    • Constraints: None.

    • Impact: Who is doing the transferring.

  • amount

    • Control: Full.

    • Constraints: None.

    • Impact: Amount being transferred.

Branches and code coverage

Negative behavior

  • Fails if an empty mapping is called.

Function call analysis

  • this.circuitBreakers[_identifier][token].preCheck(onBehalfOf, amount)

    • What is controllable? Nothing.

    • If the return value is controllable, how is it used and how can it go wrong? Discarded.

    • What happens if it reverts, reenters or does other unusual control flow? N/A.

Zellic © 2025Back to top ↑