Assessment reports>Wasabi Perps>Threat Model>computeMaxPrincipal

Function: computeMaxPrincipal(address, address, uint256 _downPayment)

This function computes the maximum principal allowed to be borrowed.

Inputs

  • <unnamed@0>

    • Impact: Unused.

  • <unnamed@1>

    • Impact: Unused.

  • _downPayment

    • Control: Full control.

    • Constraints: None.

    • Impact: The down payment the trader is paying.

Branches and code coverage

Intended branches

  • Calculates the right maximum principal allowed to be borrowed.

Negative behavior

  • Reverts if _downPayment is lower than 0.

Zellic © 2024Back to top ↑