Architecture model
Last updated
Last updated
Since the LIT token was already issued as ERC-20 token and BEP-20 token at the beginning of 2021, a token bridge is required to transfer LIT token across different chains: between Ethereum and Litmus parachain in this case.
To achieve it, Litmus takes use of the ChainBridge solution, a modular multi-directional blockchain bridge built by ChainSafe and designed to interact with multiple networks including Ethereum, Ethereum Classic and Substrate-based chains.
The workflow of the token bridge is demonstrated in the following diagram:
In the diagram above,
ChainBridge relayer contains a bridge smart contract that is deployed by the official Litentry team on the Ethereum network.
Bridge pallet is a pallet configured in the Litmus runtime. It will verify the message from the relayer and mint tokens if required.
Imagine Alice wants to transfer LIT tokens from ERC20 on Ethereum to Litmus parachain:
Alice calls the smart contract in the ChainBridge relayer with her Litmus parachain address and the number of LIT tokens she wants to transfer.
Alice transfers the desired amount of LIT tokens to the specified smart contract address
After successful verification of the transaction above, the ChainBridge Relayer issues an acknowledgment to Bridge-Pallet on Litmus parachain, with all the needed information as parameters.
Bridge-pallet gets the approval message and mints the same amount of LIT tokens to Alice provided address on parachain.
More technical details will be added later.
We also added a step-by-step guide to illustrate the whole process.