Assessment reports>Alkimiya>Threat Model>setShares

Function: setShares(uint256 oldShares, uint256 newShares, uint256 sharesChange, bytes signature)

This function is used to set the number of shares.

Inputs

  • oldShares

    • Control: Arbitrary.

    • Constraints: None.

    • Impact: Value of the old shares.

  • newShares

    • Control: Arbitrary.

    • Constraints: None.

    • Impact: Value of the new shares.

  • sharesChange

    • Control: Arbitrary.

    • Constraints: None.

    • Impact: Value of the shares change.

  • signature

    • Control: Arbitrary.

    • Constraints: None.

    • Impact: Bytes signature.

Branches and code coverage

Intended branches

  • Updates the shares.

Negative behavior

  • Reverts if the caller is not a publisher.

  • Reverts if the old share is not equal to the new share.

  • Reverts if the share change is not equal to the difference between the old and new share.

  • Reverts if the signature is invalid; signer is not the calculator role.

Zellic © 2024Back to top ↑