Assessment reports>Spectral Modelers>Threat Model>setModelerNetPerformanceResultAndUpdate

Function: setModelerNetPerformanceResultAndUpdate(address modeler)

This facilitates setting the modeler's net performance result and updating the competition contract.

Inputs

  • modeler

    • Control: Fully controlled by the caller.

    • Constraints: Checked that the modeler has opted out.

    • Impact: The modeler to be updated.

Branches and code coverage

Intended branches

  • Assure that the opt-out time of the modeler is in the future.

  • Assure that the current stake of the modeler is greater than the staked amount of the competition contract.

  • Call the setModelerNetPerformanceResultAndUpdate function of the competition contract.

Negative behavior

  • Should not allow anyone other than a validator to call this function.

  • Should not allow calling this while the contract is paused.

Zellic © 2024Back to top ↑