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:
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
Deploy a smart contract
amax.xswaponto chainMfor cross-chain management;Deploy a smart contract
as_custodyonto chainAto lock cross-chain assets; andDeploy a smart contract
as_erc20ontoBfor issuing, minting and destroying mirrored assets, governed by its DAO.
Workflow
BOapproachesDAO, requests bridging assets fromB, say 1 mnAS, and sends them intoas_custody. Then,DAOmints 1 mn AS fromas_erc20and transfers them toBO;BOplaces orders onamax.xswapwith$AMAXas escrow that is locked into the same contract;BUfinds the orders they want to take fromamax.xswapand they can either take the orders partially or entirely;BUsendsASfrom chainAtoBO's account and posts its transaction ID toamax.xswapas payment proof; andBOsendsASfrom chainBtoBU's account upon notification of order status change and closes the order uponBU's confirmation;
Note:
When there's any dispute about swap orders,
DAOwill be involved to do the arbitrage to ensure the complete closure of the orders;AMCcan also beAorBchain.
The detailed workflow diagram:

Last updated