Omnichain MIM

How MIM moves between chains

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:

  1. The LzProxyOFTV2 contract used on the Ethereum mainnet

  2. The LzIndirectOFTV2 contract used on sidechains

  3. The ElevatedMinterBurner contract that authorizes the minting and burning of MIM tokens on sidechains, allowing compatibility with already deployed MIM contract on sidechain

Beaming flow:

Mainnet to Sidechain:

This process involves transferring native MIM from the Ethereum mainnet to a sidechain.

  1. 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.

  2. 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

  3. 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.

Sidechain A to sidechain B

This process involves burning MIM tokens on sidechain A and minting them on sidechain B.

  1. 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.

  2. Once the tokens are burnt, the LzIndirectOFTV2 contract on sidechain A communicates "beaming" information to the LzIndirectOFTV2 contract on sidechain B through LayerZero.

  3. 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.

Sidechain to Mainnet

This process involves burning MIM tokens on a sidechain and transferring an equivalent amount from the proxy to the user on the Ethereum mainnet.

  1. The user interacts with the LzIndirectOFTV2 contract on the sidechain, which engages its ElevatedMinterBurner contract, burning the user's MIM tokens.

  2. Once the tokens are burnt, the LzIndirectOFTV2 contract communicates the "beaming" information to the LzProxyOFTV2 contract on the Ethereym mainnet through LayerZero.

  3. 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.

Last updated