Assessment reports>StaFi>Threat Models>init

Function: init(address _stakeMangerAddress, address _govStakeMangerAddress)

Initializes the contract.

Inputs

  • _stakeMangerAddress

    • Control: Fully controlled by the caller.

    • Constraints: None.

    • Impact: The stake manager address.

  • _govStakeMangerAddress

    • Control: Fully controlled by the caller.

    • Constraints: None.

    • Impact: The gov stake manager address.

Branches and code coverage (including function calls)

Intended branches

  • Set the stake manager address.

  • Set the gov stake manager address.

  • Rename to _stakeManagerAddress and _govStakeManagerAddress.

  • Assure _stakeMangerAddress and _govStakeMangerAddress are not zero.

  • Assure _stakeMangerAddress and _govStakeMangerAddress are not the same.

Negative behavior

  • Should not allow being called twice. Partly ensured through require(stakeManagerAddress() == address(0), "already init");.

Zellic © 2024Back to top ↑