Bridge

Introduction

The Bridge just transfers tokens from a user to another wallet (could be themselves) on a different chain. Since no call data is involved, no target contract is needed.

How does the Bridge work?

The user interacts with the Bridge through the BIM Exchange to transfer their ERC-20 (ETH, USDT, USDC, DAI, WETH) tokens to their preferred Token Bridge contract. Each of the contracts then itself transfers the ERC-20 to a single separate "lockbox" contract, to demonstrate that the underlying asset is being safely held on the base chain. Once locked, a message is sent back to the xERC-20 contact for the bridge, which mints an ERC-20 duplicate of the locked token, called an "xERC-20 token".

With the xERC-20 copy in place on the base chain, the Token Bridge can then engage with the external bridging/messaging provider to initiate the bridging process, and burn the xERC-20 to validate the request. The provider then facilitates the bridging or messaging needed to reach the target chain's Bridge contract. On receipt of the valid request, the Bridge then mints an xERC-20 to the user on the source chain.

For bridging back to Ethereum, the process is reversed. On the source chain, the xERC-20 copy is burned to validate the Bridge's bridge transaction with the external provider. On receipt of that message, the xERC-20 contract mints an equivalent copy, which is used to demonstrate the transaction to the lockbox. The xERC-20 is then burned to release the underlying ERC-20, which is transferred back to the user on Ethereum.

Between bridged chains, the process is simply that the xERC-20 on the source chain must be burned to trigger the bridging service through the Bridge. Once the service delivers to the target chain's Bridge contract, a new xERC-20 token is minted and transferred to the user.

Bridge Fees

Bridge fees are available here

Last updated