Assessment reports>Spectral Modelers>Threat Model>replaceOptOutTopNModeler

Function: replaceOptOutTopNModeler(uint256 oldModelerIndex, address oldModeler, address modeler)

This allows replacing an opt-out top N modeler.

Inputs

  • oldModelerIndex

    • Control: Fully controlled by the caller.

    • Constraints: None.

    • Impact: The index of the old modeler.

  • oldModeler

    • Control: Fully controlled by the caller.

    • Constraints: None.

    • Impact: The old modeler to be replaced.

  • modeler

    • Control: Fully controlled by the caller.

    • Constraints: None.

    • Impact: The new modeler to replace the old one.

Branches and code coverage

Intended branches

  • Assure that the oldModelerIndex corresponds to the oldModeler. Currently not performed.

  • Assure that the modeler's stake has been transferred back. Currently not performed.

  • Assure that the old modeler is different than the new one. Currently not performed.

  • Assure that the modeler has opted out.

Negative behavior

  • Assure that the oldModeler is a top N modeler. Currently not performed.

  • Assure that the oldModeler has opted out. Currently not performed.

  • Assure that no one other than the validator can call this function.

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

  • Should not allow replacing modeler to the modeler that has not opted out.

Zellic © 2024Back to top ↑