Assessment reports>Spectral Modelers>Threat Model>postGraded

Function: postGraded(address modeler, string _ipfsGraded, uint256 _performanceResult, string _ipfsGradeDetailLink)

This facilitates grading a specific modeler.

Inputs

  • modeler

    • Control: Fully controlled by the caller.

    • Constraints: Checked that the modeler has been challenged and responded.

    • Impact: The modeler to be graded.

  • _ipfsGraded

    • Control: Fully controlled by the caller.

    • Constraints: None.

    • Impact: The IPFS of the grade.

  • _performanceResult

    • Control: Fully controlled by the caller.

    • Constraints: None.

    • Impact: The performance result of the modeler.

  • _ipfsGradeDetailLink

    • Control: Fully controlled by the caller.

    • Constraints: None.

    • Impact: The IPFS of the grade detail link.

Branches and code coverage

Intended branches

  • Assure that the modeler's response was issued for the specific challenge. Currently not performed.

  • Assumed that the topNModelers array will properly update within the competition contract. Currently not checked.

  • Assumed that the challenge's performance is graded for this contract's specific competition. Currently not explicitly checked.

  • Set the ipfsGraded of the modelerChallenges mapping for the modeler.

  • Set the performanceResult of the modelerChallenges mapping for the modeler.

  • Set the ipfsGradeDetailLink of the modelerChallenges mapping for the modeler.

  • Set the medianPerformanceResults of the modelers mapping for the modeler. Currently this simply refers to the performanceResult of the modelerChallenges mapping for the modeler.

Negative behavior

  • Should not allow a validator that is not directly linked to the modeler to grade them. Currently not checked.

  • Should not allow overriding a grade. Currently not checked.

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

Zellic © 2024Back to top ↑