Assessment reports>Spectral Modelers>Threat Model>deployModeler

Function: deployModeler(address _competitionContract, IERC20 _validatorToken, uint256 _validatorStakeAmount, uint256 _maxValidators)

This should deploy a new Modeler contract.

Inputs

  • _competitionContract

    • Control: Fully controlled by the caller.

    • Constraints: Cannot be zero address.

    • Impact: Sets the competitionContract variable of the Modeler contract.

  • _validatorToken

    • Control: Fully controlled by the caller.

    • Constraints: Cannot be zero address.

    • Impact: Sets the validatorToken variable of the Modeler contract.

  • _validatorStakeAmount

    • Control: Fully controlled by the caller.

    • Constraints: Cannot be zero.

    • Impact: Sets the validatorStakeAmount variable of the Modeler contract.

  • _maxValidators

    • Control: Fully controlled by the caller.

    • Constraints: Cannot be zero.

    • Impact: Sets the maxValidators variable of the Modeler contract.

Branches and code coverage

Intended branches

  • Assure that the initialize function is called on the Modeler contract. Currently not performed.

  • Append the new Modeler contract to the allModelers array.

  • Deploy the new Modeler contract.

Negative behavior

  • _competitionContract cannot be zero address.

  • _validatorToken cannot be zero address.

  • _maxValidators cannot be zero.

  • Caller is the owner.

Zellic © 2024Back to top ↑