Cross Domain Messaging (XDM)
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:
Source | Destination | Confirmation Blocks | Confirmation Time |
---|---|---|---|
Consensus | Domain | 100 consensus | ~10 minutes |
Domain A | Domain B | 14,400 domain | ~1 day |
Domain | Consensus | 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 transaction is charged at 5x its standard weight since it is not possible to accurately predict the destination chain fee when submitting.
Executing XDM Transfers
Consensus to Auto EVM domain with PolkadotJS
You will need to navigate to the consensus domain in PolkadotJS by either selecting it in the network switcher or following this link: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.mainnet.autonomys.xyz%2Fws#/extrinsics
PolkadotJS must be linked to a wallet that has some AI3 tokens on the consensus chain. You can use SubWallet, Polkadot, or Talisman Wallet for this.
- Platform: Ethereum
- RPC Url: https://auto-evm.mainnet.autonomys.xyz/ws
- Network Name: Auto EVM Mainnet (or any name you prefer)
- Native Token Symbol: AI3
- Native Token Coingecko ID: autonomys-network
- Native Token Name: Autonomys EVM (or any name you prefer)
- Block Explorer Url: https://explorer.auto-evm.mainnet.autonomys.xyz/
Working from the top down:
- Select the account you want to XDM consensus tokens from.
- Select the
transporter.transfer()
extrinsic. - Select
Domain
in thedstLocation
chainId
dropdown. - Enter the domain you want to use in the
Domain
with 0 being the Auto EVM domain. - Select
AccountId20
in theAccountId
dropdown. - Enter the
0x
EVM account address you want to send the tokens to on the Auto EVM domain. - Enter the amount, which will be the number of tokens with 18 zeroes afterwards as the value is in Shannons.
- Submit Transaction.
Auto EVM domain to consensus with PolkadotJS
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.mainnet.autonomys.xyz%2Fws#/extrinsics
PolkadotJS must be linked to a wallet that has some AI3 tokens on the EVM domain chain. You can use either SubWallet or Talisman Wallet for this.
Working from the top down:
- Select the account you want to XDM from.
- Select the
transporter.transfer()
extrinsic. - Select
Consensus
in thedstLocation
chainId
. - Enter your Autonomys account address in the
AccountId32
textbox. - Enter the amount, which will be the number of tokens with 18 zeroes afterwards as the value is in Shannons.
- Submit Transaction.
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.