Assessment reports>Anzen and protocol-v2>Threat Model>Function: executeMessage(bytes memory message)

Function: executeMessage(bytes memory message)

The function processes incoming cross-chain messages, updating the total supply and user positions accordingly.

Inputs

  • message

    • Control: Arbitrary.

    • Constraints: Must be a properly formatted message containing encoded msgTime, supply, and optional userData.

    • Impact: The parameter contains the data needed for updating the total supply and user positions.

Branches and code coverage

Intended branches

  • Decode message to access msgTime, supply, and userData.

  • Call _setNewTotalSupply to update the total supply at msgTime.

  • Call _setNewUserPosition to update the user's position if userData is not empty.

Negative behavior

  • Revert if msgTime is older than lastTotalSupplyReceivedAt.

Zellic © 2025Back to top ↑