Cross-Chain Message

As a result of the actions of the ActionExecutor contract on the initiation chain, data generated is sent to the destination chain to complete the transaction.

To transmit a cross-chain message, one of the cross-chain message providers is used, depending on the message fee price and message delivery time based on data of previous transactions. User can specify which cross-chain message protocol to use on Interport UI.

Cross chain message providers:

  • LayerZero - an omnichain interoperability protocol.

The swap data amount for the destination chain is derived from the amount of stablecoins sent to the Vault contract origin chain, which makes it impossible to compromise the output amount on the destination chain. The algorithm also takes into account the possible difference in decimal numbers of tokens on different networks.

A cross-chain call fee is also accounted for in the execution function call on the ActionExecutor contract. To calculate the payment for the call, the frontend calls the messageFeeEstimate function of the ActionExecutor.

The ActionExecutor contract sends the data and payment for the cross-chain call to the Gateway contract. This contract uses external cross-chain messaging mechanisms to deliver data to a similar Gateway contract on the target network.

The Gateway on the second network receives the data and checks the sender of the message, then calls the handleExecutionPayload function on the ActionExecutor contract on the second network.

Last updated