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
-
[Mainnet] Owner registers ERC20
-
[SKALE Chain] Owner deploys clone
-
[SKALE Chain] Owner assigns clone minter
-
[SKALE Chain] Owner registers clone
Transfer Flow
Deposit
-
[Mainnet] User Approves ERC20 transfer
-
[Mainnet] User deposits ERC20 to DepositBox
-
[SKALE Chain] User can now transfer clone
Withdrawal
-
[Mainnet] User funds CommunityPool ETH for exit
-
[SKALE Chain] User exits from TokenManager
-
[Mainnet] User can now transfer ERC20
Automatic - Setup Steps
-
[SKALE Chain] Owner enables Autodeploy Mapping
-
[Mainnet] Owner disables whitelist
Owner can enable autodeploy and keep whitelist enabled to allow automatic mapping of only certain tokens. |
Transfer Flow
Deposit
-
[Mainnet] User approves ERC20 transfer
-
[Mainnet] User deposits ERC20 to DepositBox
-
[SKALE Chain] User can now transfer clone
Withdrawal
-
[Mainnet] User funds CommunityPool ETH for exit
-
[SKALE Chain] User exits from TokenManager
-
[Mainnet] User can now transfer ERC20
ERC721/1155
ERC721 Manual - Setup Steps
-
[Mainnet] Owner registers ERC721
-
[SKALE Chain] Owner deploys clone
-
[SKALE Chain] Owner assigns clone minter
-
[SKALE Chain] Owner registers clone
ERC721 Transfer Flow
Deposit
-
[Mainnet] User Approves ERC721 transfer
-
[Mainnet] User deposits ERC721 to DepositBox
-
[SKALE Chain] User can now transfer clone
Withdrawal
-
[Mainnet] User funds CommunityPool ETH for exit
-
[SKALE Chain] User exits from TokenManager
-
[Mainnet] User can now transfer ERC721
ERC721 Automatic - Setup Steps
-
[SKALE Chain] Owner sets Autodeploy Mapping
-
[Mainnet] Owner sets whitelist
ERC721 Transfer Flow
Deposit
-
[Mainnet] User Approves ERC721 transfer
-
[Mainnet] User deposits ERC721 to DepositBox
-
[SKALE Chain] User can now transfer clone
Withdrawal
-
[Mainnet] User funds CommunityPool ETH for exit
-
[SKALE Chain] User exits from TokenManager
-
[Mainnet] User can now transfer ERC721
ERC1155 Automatic Setup Steps
-
[SKALE Chain] Owner sets Autodeploy Mapping
-
[Mainnet] Owner sets whitelist
ERC1155 Transfer Flow
Deposit
-
[Mainnet] User Approves ERC1155 transfer
-
[Mainnet] User deposits ERC1155 to DepositBox
-
[SKALE Chain] User can now transfer clone
Withdrawal
-
[Mainnet] User funds CommunityPool ETH for exit
-
[SKALE Chain] User exits from TokenManager
-
[Mainnet] 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
-
[Mainnet] Owner deploys Extension + NFT contract copy
-
[Mainnet] Owner registers extension
-
[SKALE Chain] Owner deploys Extension
-
[SKALE Chain] Owner registers extension
-
[SKALE Chain] Owner deploys clone
-
[Mainnet] Owner sets Extension to SKALE Chain Extension
-
[Mainnet] Owner assigns NFT Minter to Extension