Architecture model
Last updated
Was this helpful?
Last updated
Was this helpful?
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 Litentry parachain in this case.
After the rebranding, LIT will be replaced by HEI. No new token issued.
To achieve transfering token across different chains, Heima makes 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. Heima also has its own adaptation of ChainBridge.
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 Heima 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 HEI tokens from ERC20 on Ethereum to Heima Network:
Alice calls the smart contract in the ChainBridge relayer with her Heima Network address and the number of HEI tokens she wants to transfer.
Alice transfers the desired amount of HEI tokens to the specified smart contract address
After successful verification of the transaction above, the ChainBridge Relayer issues an acknowledgment to Bridge-Pallet on Heima Network, with all the needed information as parameters.
Bridge-pallet gets the approval message and mints the same amount of HEI 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.