Assessment reports>Programmable Derivatives>Threat Model>setBondAndLeverageAmount

Function: setBondAndLeverageAmount(uint256 _bondAmount, uint256 _leverageAmount)

This function is used to set the bond and leverage token amounts. It can only be called by the owner before the deposit end time.

Inputs

  • _bondAmount

    • Control: Arbitrary.

    • Constraints: None.

    • Impact: Amount of bond tokens.

  • _leverageAmount

    • Control: Arbitrary.

    • Constraints: None.

    • Impact: Amount of leverage tokens.

Branches and code coverage

Intended branches

  • Update the bond and leverage amounts to the new amounts.

Negative behavior

  • Revert if the caller is not the owner.

  • Revert if the deposit period has ended.

  • Revert if the pool has already been created.

Zellic © 2025Back to top ↑