Assessment reports>Orderly Network>Threat Model>sendMessage

Function: sendMessage(OrderlyCrossChainMessage.MessageV1 data, byte[] payload)

This allows a caller (privileged role) to send a cross-chain message over the LZ endpoint.

Inputs

  • data

    • Control: Fully controlled by the caller.

    • Constraints: None.

    • Impact: The cross-chain message that will be sent.

  • payload

    • Control: Fully controlled by the caller.

    • Constraints: None.

    • Impact: The cross-chain message that will be sent.

Branches and code coverage

Intended branches

  • Assure that msg.value is greater than or equal to the native fee. Currently not implemented.

  • In case that user sends more than the native fee, the excess should be refunded. Currently not implemented, as the _refundAddress is set to address(this).

  • Estimate the native fee using lzEndpoint.estimateFees.

  • Call _lzSend with the estimated native fee.

Negative behavior

  • Should not be callable by anyone other than a trusted caller.

Zellic © 2024Back to top ↑