2.60 Cross-Chain Mechanism

In Armonia's multichain universe, the ability of "moving" an asset from one chain to another can be critical for asset owners. If the originating asset resides in its home chain where the asset is issued from, "moving" the asset means locking an asset in the originating chain and minting the assets from the destination chain and transferring the assets to the designated account. However, if the originating asset resides in a non-native chain, "moving" the asset means destroying or burning the asset from the originating chain, unlocking the asset and sending the designated account from the home chain to the asset. This two-way moving activity that happens between any two chains within Armonia's multichain universe are cross-chain transactions.

Through cross-chain transactions, asset owner can move an asset from one chain to another, which greatly increases the liquidity and usability of the asset. This flexibility can help satisfy all kinds of application scenarios that happen in the entire ecosystem.

However, the following problems must be solved to achieve bi-directional, reliable and efficient cross-chain transactions:

  • how to ensure the finality of the asset-moving transaction on-chain?

  • how to synchronize the asset transferring or locking result from one chain to another?

  • how to ensure transactions involved in cross-chain workflow are effective and accurate as expected?

  • how to prevent malicious users from stealing the assets during the cross-chain transactions?

  • how to prevent the mirroring asset from being overly inflated?

At the same time, one important question that remains to be answered is: How to establish a simple-to-use and unified cross-chain solution that can work with all kinds of blockchain in Armonia's multichain universe?

In addressing the above problems, one hybrid and reliable cross-chain solution has been proposed as follows:

Legend:

Item
Symbol

Armonia Meta Chain

M

Asset originating chain

A

Asset destination chain

B

Cross-chain user

BU

Cross-chain operator

BO

Cross-chain asset

AS

DAO for asset-mirrored chain

DAO

Note: Distribution of assets from chain A has been determined by its consensus mechanism, tokenomics and ecosystem. However, for an asset to be mirrored to its destination chain B it must be managed within an ERC20 token contract for its issuing, minting, transferring, burning, etc. and these activities will be governed by its DAO body.

  • Preparation work

  1. Deploy a smart contract amax.xswap onto chain M for cross-chain management;

  2. Deploy a smart contract as_custody onto chain A to lock cross-chain assets; and

  3. Deploy a smart contract as_erc20 onto B for issuing, minting and destroying mirrored assets, governed by its DAO.

  • Workflow

  1. BO approaches DAO, requests bridging assets from B, say 1 mn AS, and sends them into as_custody. Then, DAO mints 1 mn AS from as_erc20 and transfers them to BO;

  2. BO places orders on amax.xswap with $AMAX as escrow that is locked into the same contract;

  3. BU finds the orders they want to take from amax.xswap and they can either take the orders partially or entirely;

  4. BU sends AS from chain A to BO's account and posts its transaction ID to amax.xswap as payment proof; and

  5. BO sends AS from chain B to BU's account upon notification of order status change and closes the order upon BU's confirmation;

Note:

  1. When there's any dispute about swap orders, DAO will be involved to do the arbitrage to ensure the complete closure of the orders;

  2. AMC can also be A or B chain.

The detailed workflow diagram:

Last updated