Omnichain MIM
How MIM moves between chains
Last updated
How MIM moves between chains
Last updated
Abracadabra's Cross-Chain Token Beaming System utilizes the Omnichain Fungible Token (OFT) standard by LayerZero, a decentralized and highly scalable protocol for cross-chain transactions. This system replaces the previous Multichain router for web3 that facilitated arbitrary cross-chain interactions. The system comprises three components:
The LzProxyOFTV2 contract used on the Ethereum mainnet
The LzIndirectOFTV2 contract used on sidechains
The ElevatedMinterBurner contract that authorizes the minting and burning of MIM tokens on sidechains, allowing compatibility with already deployed MIM contract on sidechain
This process involves transferring native MIM from the Ethereum mainnet to a sidechain.
The user initiates the process by interacting with the LzProxyOFTV2
contract on the Ethereum mainnet, which transfers MIM from the user's address to the contract's own address.
Once the transfer to the LzProxyOFTV2
mainnet contract is complete, it communicates the transaction details, or "beaming" information, to the LzIndirectOFTV2
contract on the sidechain through LayerZero
The LzIndirectOFTV2
contract on the sidechain then interacts with the ElevatedMinterBurner
contract, which mints an equivalent amount of MIM tokens on sidechain, credited to the user's account.
This process involves burning MIM tokens on sidechain A and minting them on sidechain B.
The user first interacts with the LzIndirectOFTV2
contract on sidechain A which then calls upon the ElevatedMinterBurner
contract on the same sidechain, burning the user's MIM tokens.
Once the tokens are burnt, the LzIndirectOFTV2
contract on sidechain A communicates "beaming" information to the LzIndirectOFTV2
contract on sidechain B through LayerZero.
Upon receiving the beaming information, the LzIndirectOFTV2
contract on sidechain B interacts with its ElevatedMinterBurner
, which mints an equivalent amount of MIM tokens on sidechain B, assigned to the user's account.
This process involves burning MIM tokens on a sidechain and transferring an equivalent amount from the proxy to the user on the Ethereum mainnet.
The user interacts with the LzIndirectOFTV2
contract on the sidechain, which engages its ElevatedMinterBurner
contract, burning the user's MIM tokens.
Once the tokens are burnt, the LzIndirectOFTV2
contract communicates the "beaming" information to the LzProxyOFTV2
contract on the Ethereym mainnet through LayerZero.
The LzProxyOFTV2
contract on mainnet transfers an equivalent amount of MIM tokens from itself to the user's account.
Note that while these examples use a generic "user" term, Omnichain MIM can be beamed from one user to another or to oneself, with the sender specifying the recipient.