Assessment reports>d3-doma>Threat Model>Function: sendMessage(string calldata destinationChain, string calldata receiver, bytes calldata payload, bytes[] calldata attributes)

Function: sendMessage(string calldata destinationChain, string calldata receiver, bytes calldata payload, bytes[] calldata attributes)

This function sends cross-chain messages by validating attributes, generating nonces, and emitting a MessagePosted event. Only permitted senders can execute this function, and it ensures proper nonce management for replay-attack prevention.

This contract will be deployed on both the Doma chain and the tokenization chain.

Inputs

  • destinationChain

    • Control: Full.

    • Constraints: Used as input to _useNonce() for destination-specific nonce generation.

    • Impact: Ensures nonce isolation between different destination chains, preventing cross-chain replay attacks.

  • receiver

    • Control: Full.

    • Constraints: N/A.

    • Impact: Specifies the target receiver address on the destination chain — no validation performed at source.

  • payload

    • Control: Full.

    • Constraints: N/A.

    • Impact: Contains the actual data to be executed on the destination chain — no validation at source level.

  • attributes

    • Control: Full.

    • Constraints: Each attribute selector is validated via supportsAttribute() to ensure only supported attributes are included.

    • Impact: Prevents inclusion of unsupported metadata that could cause processing issues on the destination chain.

Branches and code coverage (including function calls)

Intended branches

Negative behavior

Zellic © 2025Back to top ↑