Assessment reports>Orderly Network>Threat Model>setAllowedSymbol

Function: setAllowedSymbol(byte[32] _symbolHash, bool _allowed)

This allows the owner of the contract to add the allowed symbol and also remove it from allowedSymbolSet.

Inputs

  • _symbolHash

    • Control: Full control by owner.

    • Constraints: N/A.

    • Impact: The executeProcessValidatedFutures function will revert if using symbols is not allowed.

  • _allowed

    • Control: Full control by owner.

    • Constraints: N/A.

    • Impact: If _allowed is true, the _symbolHash will be added; if _allowed is false, the _symbolHash will be removed.

Branches and code coverage

Intended branches

  • New hash was added successfully if _allowed is true.

  • New hash was removed successfully if _allowed is false.

Negative behavior

  • Zero hash.

  • The same hash already added if _allowed is true.

  • allowedSymbolSet does not contain the hash if _allowed is false.

  • Caller is not an owner.

Zellic © 2024Back to top ↑