Assessment reports>Staking>Threat Model>initialize

Function: initialize(address[] _depositTokens, address _distributor)

Initializes the contract.

Inputs

  • _depositTokens

    • Control: Fully controlled by the owner.

    • Constraints: None.

    • Impact: Whitelists specified tokens for staking.

  • _distributor

    • Control: Fully controlled by the owner.

    • Constraints: None.

    • Impact: Sets the RewardDistributor contract address.

Branches and code coverage (including function calls)

Intended branches

  • Sets the isInitialized flag to true.

  • Sets the isDepositToken flag to true for each _depositToken.

  • Sets the distributor address to _distributor.

Negative behavior

  • Should not be callable by anyone other than the owner.

  • Should not be callable if the contract is already initialized.

Zellic © 2024Back to top ↑