IMA Bridge Example Flow Diagrams
The IMA bridge is a very modular and expandable system. To illustrate some different ways the bridge can be setup by a SKALE Chain owner, please reference the below diagrams. Besides supporting ERC20, ERC721, and ERC1155 natively, the IMA bridge can be expanded to any other token type or arbitrary message (See "Managing other contracts using Message Proxy).
Also, a SKALE Chain owner can setup the bridge in different ways, for example:
-
manual (permission-by-owner): allows the Owner to permit only certain token types to transfer through the bridge, or
-
automatic (permissionless): allows any token deposits to automatically map and transfer through the bridge.
Please see manual or automatic flows below for more information, and check out IMA Access Control for additional information.
ERC20
Manual - Setup Steps
-
[Ethereum] Owner registers ERC20
-
[SKALE Chain] Owner deploys clone
-
[SKALE Chain] Owner assigns clone minter
-
[SKALE Chain] Owner registers clone
Transfer Flow
Deposit
-
[Ethereum] User Approves ERC20 transfer
-
[Ethereum] User deposits ERC20 to DepositBox
-
[SKALE Chain] User can now transfer clone
Withdrawal
-
[Ethereum] User funds CommunityPool ETH for exit
-
[SKALE Chain] User exits from TokenManager
-
[Ethereum] User can now transfer ERC20
Automatic - Setup Steps
-
[SKALE Chain] Owner enables Autodeploy Mapping
-
[Ethereum] Owner disables whitelist
Owner can enable autodeploy and keep whitelist enabled to allow automatic mapping of only certain tokens. |
There are several limits to using automatic deployment. When using this method:
|
Transfer Flow
Deposit
-
[Ethereum] User approves ERC20 transfer
-
[Ethereum] User deposits ERC20 to DepositBox
-
[SKALE Chain] User can now transfer clone
Withdrawal
-
[Ethereum] User funds CommunityPool ETH for exit
-
[SKALE Chain] User exits from TokenManager
-
[Ethereum] User can now transfer ERC20
ERC721/1155
ERC721 Manual - Setup Steps
-
[Ethereum] Owner registers ERC721
-
[SKALE Chain] Owner deploys clone
-
[SKALE Chain] Owner assigns clone minter
-
[SKALE Chain] Owner registers clone
ERC721 Transfer Flow
Deposit
-
[Ethereum] User Approves ERC721 transfer
-
[Ethereum] User deposits ERC721 to DepositBox
-
[SKALE Chain] User can now transfer clone
Withdrawal
-
[Ethereum] User funds CommunityPool ETH for exit
-
[SKALE Chain] User exits from TokenManager
-
[Ethereum] User can now transfer ERC721
ERC721 Automatic - Setup Steps
-
[SKALE Chain] Owner sets Autodeploy Mapping
-
[Ethereum] Owner sets whitelist
ERC721 Transfer Flow
Deposit
-
[Ethereum] User Approves ERC721 transfer
-
[Ethereum] User deposits ERC721 to DepositBox
-
[SKALE Chain] User can now transfer clone
Withdrawal
-
[Ethereum] User funds CommunityPool ETH for exit
-
[SKALE Chain] User exits from TokenManager
-
[Ethereum] User can now transfer ERC721
ERC1155 Automatic Setup Steps
-
[SKALE Chain] Owner sets Autodeploy Mapping
-
[Ethereum] Owner sets whitelist
ERC1155 Transfer Flow
Deposit
-
[Ethereum] User Approves ERC1155 transfer
-
[Ethereum] User deposits ERC1155 to DepositBox
-
[SKALE Chain] User can now transfer clone
Withdrawal
-
[Ethereum] User funds CommunityPool ETH for exit
-
[SKALE Chain] User exits from TokenManager
-
[Ethereum] User can now transfer ERC1155
ERC721/1155 - SKALE Mint first
The following flow applies equally to 721 and 1155 contracts.
Deploy/Mint Process
-
[SKALE Chain] Deploy and Mint NFTs
-
[SKALE Chain] Upload images/videos + json to SKALE Chain Filestorage
One-time Setup Steps
-
[Ethereum] Owner deploys Extension + NFT contract copy
-
[Ethereum] Owner registers extension
-
[SKALE Chain] Owner deploys Extension
-
[SKALE Chain] Owner registers extension
-
[SKALE Chain] Owner deploys clone
-
[Ethereum] Owner sets Extension to SKALE Chain Extension
-
[Ethereum] Owner assigns NFT Minter to Extension