Bridge tokens with ZenBridge
ZenBridge is a powerful decentralized application (dApp) designed to seamlessly bridge any supported EVM-based token to and from Zenchain, enabling smooth and secure cross-chain transfers. This guide will walk you through each step of bridging your tokens, ensuring a secure and efficient transfer.
Connect Your Wallet
- Navigate to https://zenbridge.zenchain.io
- Click the "Connect Wallet" button and link your Ethereum wallet.
Select the Source Blockchain
You can select the Source Blockchain, which is the network from which you want to transfer your tokens. This is the blockchain where your assets are currently held before being bridged to another network.
When choosing the source blockchain, ensure that you have sufficient funds in your wallet to cover both the transfer amount and any associated gas fees.
Switch Blockchain (if needed)
You can seamlessly switch between the selected blockchains at any time, allowing you to modify the source and destination networks before initiating a transfer.
Select the Token
The list of available tokens (Supported Tokens) will update dynamically based on the selected source and destination blockchains. If you don’t see your desired token, try selecting a different network, as each token is tied to a specific blockchain.
Key considerations when selecting a Token:
- Network Compatibility: Some tokens exist on multiple blockchains, while others are native to a single network. Ensure you're selecting the correct blockchain where your token is held.
- Bridging Support: Not all tokens are bridgeable across all networks. Check if your token is supported for cross-chain transfers.
Check Token balance
After selecting a token, you can view your available balance directly within the interface. If you want to transfer the maximum possible amount, simply click the "Max" button to automatically input your entire available balance into the amount field.
Input amount
You need to enter the exact amount of assets you wish to transfer across chains. This value determines how much of your selected token will be moved from the source blockchain to the destination blockchain.
Estimated time and Fees
After selecting the source blockchain, you can view the current bridge fees, which are deducted from the total amount you are transferring. The final amount received on the destination blockchain is calculated as:
Destination amount = Source amount - Bridge fees
The bridge typically takes approximately 20 minutes to index all the necessary data before executing the cross-chain transfer. This indexing process ensures a secure and accurate transfer of assets between blockchains.
Initiate cross-chain transaction
Once you have selected the source blockchain, chosen the token, and entered the amount, you can proceed with the cross-chain transfer by clicking either "Approve & Send" or "Permit & Send", depending on the token's approval mechanism.
Understanding the Approval Methods:
-
Approve & Send: Used when the token does not support ERC-2612 (Permit). This requires two transactions:
- Approval Transaction: Grants the bridge permission to spend your tokens.
- Transfer Transaction: Executes the cross-chain transfer.
-
Permit & Send: Available for tokens that support ERC-2612 (Permit https://eips.ethereum.org/EIPS/eip-2612), allowing you to approve and send in a single transaction, reducing gas fees and improving efficiency.
Once the transaction is initiated, you can check its status in the Transactions area.
Behind the scenes, the bridge performs the following steps:
-
Indexes Your Locking / Burning Transaction: The bridge first indexes the transaction where the assets are locked or burned.
-
Waits for Bridge Operators to Process & Sign: The bridge waits for the operators to process and sign a message containing your transaction data.
-
Indexes the Signed Messages from Bridge Operators: Once the bridge operators sign the transaction, their messages are indexed for validation.
-
Displays Claim Button Once Ready: When the transaction is ready for claiming, the Claim button appears on each transaction info card.
This ensures that you can track your transaction’s progress and take action when it’s ready for claiming.
Real-Time transaction logging
During the transaction process, the bridge logs each processing step in real-time, providing valuable insights into the status of your transfer.
What You Can Expect in the Logs:
-
Preparing Data: The bridge gathers all necessary data to execute the cross-chain transaction.
-
Switching Network (If Needed): If your wallet is not connected to the correct blockchain, it automatically switches to the source network.
-
Approving / Permitting:
- If the token does not support ERC-2612 (Permit) → Awaits the approval transaction.
- If the token supports ERC-2612 (Permit) → Requests signature approval instead of a transaction.
-
Locking & Transferring / Locking & Transferring with Permit: When bridging from an external chain to Zenchain, the bridge locks the assets before transferring them.
-
Burning & Transferring / Burning & Transferring with Permit: When bridging from Zenchain to an external chain, the bridge burns the assets before initiating the transfer.
-
Minting: When claiming tokens on Zenchain, the bridge executes the minting transaction.
-
Unlocking: When claiming tokens on an external chain, the bridge processes the unlocking transaction.
Each step ensures a transparent and trackable cross-chain transfer process.
Transactions area
In the Transactions area, you can check the status of each transaction, whether it's in processing, needs to be claimed, or has been processed. At the top of the tab, you can also see how many transactions are still in the Processing state (not yet completed).
This helps you easily track the progress of your transactions and identify any that are pending.
For each transaction, you can check the following details:
- Sent: The amount transferred during the transaction.
- From/To: Displays the transfer flow, from the source blockchain to the destination blockchain.
- Fee: The fee incurred for processing the transaction.
- Status: The current status of the transaction, which can be one of the following:
- Processing: The bridge is awaiting the indexing of operators' signed data.
- Claim: The tokens are ready to be claimed on the destination chain.
- Processed: Tokens have been successfully claimed on the destination chain.
- Estimated Time: The bridge typically takes approximately 20 minutes to complete the process.
- Send Transaction Hash: The hash of the locking/burning transaction on the source blockchain.
- Claim Transaction Hash: The hash of the unlocking/minting transaction on the destination blockchain.
Claim tokens
Once the bridge has gathered all the necessary operator-signed data, the transaction becomes ready for claiming. Clicking the "Claim" button will initiate the minting/unlocking transaction on the destination blockchain.
Once the tokens are claimed, they are sent to your wallet address on the destination chain, and the transaction status updates to "Processed".