Skip to main content

Cross Domain Messaging (XDM) Guide

Cross Domain Messaging on the Autonomys Network

This guide explains what XDM is and walks you through how to transfer assets between consensus and domain chains.

Introducing Cross Domain Messaging (XDM)

Cross Domain Messaging (XDM) is a core feature of the Autonomys Network that enables secure and seamless communication between independent blockchain domains, such as the consensus chain and specialized domains like Auto EVM. XDM allows these separate blockchains to exchange assets, messages, and data reliably, enhancing interoperability and collaboration across the entire Autonomys ecosystem.

If you want to learn more about the technical nuances of XDM you can find further details in our protocol specs.

XDM Confirmation and Timing

To maintain security, there is a challenge period that has to expire when transferring tokens between domains and the consensus chain. Tokens are not fully available for use until the confirmation time has passed. Study the table below to understand confirmation blocks and rough timings:

SourceDestinationConfirmation BlocksConfirmation Time
共识100 consensus~10 minutes
Domain ADomain B14,400 domain~1 day
共识14,400 domain~1 day

Refunds due to a failure to complete an XDM transfer will take 28,800 blocks in total

As long as the XDM is confirmed on the source chain (100 consensus blocks or 14,400 domain blocks) the XDM is able to be relayed and executed (the transfer happens) on the destination chain.

The destination chain generates an XDM response that will be sent back to the source chain after the XDM response is confirmed on the destination chain (100 consensus blocks or 14,400 domain blocks), but the XDM response is mostly a no-op and only useful when the XDM is failed and it is necessary to refund the sender on the sender chain.

XDM Fees

An XDM transfer in any direction costs 2 tAI3 on Taurus. This fee amount is yet to be determined on mainnet and there are plans to make it dynamic. The price is also likely to change based on the outcomes of the SR Labs security audit report.

What Happens to the XDM Fee?

The tAI3 is earned by the operators for processing the transaction. They share that execution fee with their nominators. A portion also goes to farmers for storing the transaction.

Executing XDM Transfers

Consensus to Auto EVM domain

Visit https://astral.autonomys.xyz/taurus/transfer

Astral - Transfer

Select networks for XDM Consensus → Auto EVM. Enter amount to transfer.

Astral - XDM Amount

Hit Send token and you will be asked to approve the signature request.

SubWallet - Consensus to Auto EVM

After hitting Approve you will see an extrinsic hash.

Astral - Extrinsic Hash

Which you can search on Astral.

Astral - Search Extrinsic

Astral - View Extrinsic

Our target account starts with no tokens

SubWallet - No Tokens

We can also check the balance on the Auto EVM explorer at https://blockscout.taurus.autonomys.xyz/

Blockscout - No Tokens

We wait 10 minutes for the confirmation…

SubWallet - Tokens Arrived

Blockscout - Tokens Arrived

And we have successfully completed an XDM transfer from consensus to Auto EVM.

Auto EVM domain to consensus with SubWallet and PolkadotJS

So now we have some tokens on the Auto EVM domain, let’s try and send some back the other way.

First, we will need the 0x public key of the account you want to send the tokens to on consensus. If you do not have this, you can get it from ss58.org as per the below screenshot.

Convert Public Key

Next, you will need to navigate to the Auto EVM domain in PolkadotJS by either selecting it in the network switcher or following this link: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fauto-evm.taurus.autonomys.xyz%2Fws#/extrinsics

Working from the top down:

  1. Select the account you want to XDM from.
  2. Select the transporter.transfer() extrinsic.
  3. Select Consensus in the dstLocation chainId.
  4. Enter the 0x account address we got above in the AccountId32 textbox. NOTE: it is possible to use the “Substrate: 42” address that starts with a 5 in this box if you find that easier.
  5. Enter the amount, which will be the number of tokens with 18 zeroes afterwards as the value is in Shannons.
  6. Submit Transaction.

PolkadotJS

Auto EVM domain to consensus with Talisman

Transferring tokens from Auto EVM to Consensus can be tricky in SubWallet because of its unified accounts design. With the Talisman Wallet, the flow is far simpler - just as easy as sending tokens from Consensus to Auto EVM.

In your wallet you should have both a consensus account and an EVM account listed.

Talisman

Make sure that you have some funds in your EVM wallet. For this demonstration, there are 10 tAI3 tokens in both the consensus and EVM accounts.

Talisman

Talisman

Visit https://astral.autonomys.xyz/taurus/transfer

Astral - Transfer

Select networks for Auto EVM → Consensus. Enter an amount to transfer, and a destination address.

Talisman

Hit Send token and you will be asked to approve the signature request.

Talisman

After hitting Approve you will see an extrinsic hash.

Astral - Extrinsic Hash

Checking the EVM account balance, you can see that it is now 7. 1 tAI3 token was sent and 2 tAI3 was used for the transaction fee.

Talisman

After waiting 14,400 domain blocks (can be from 1-2 days depending on block production speed), you can see that the Consensus account balance has increased by 1 tAI3 to 11 tAI3.

Talisman

Automated XDM

It is possible to use the Auto SDK’s @autonomys/auto-xdm package to submit these transactions if you’d like to automate them in some way.