About AUC Bridge
Last updated
Last updated
The 'AUC Bridge' is a cross-chain solution designed to expand the Ethereum-based AUC governance token to other chains. The bridge utilizes LayerZero technology to enable seamless transfers between AUC, AUCB (Base chain), and AUCA (Avalanche chain) tokens.
Access the website.
Connect AUC Holding Wallet.
Select the desired origin and destination chain.
Enter the amount of tokens you want to transfer(bridge).
Click the 'Approve Tokens' button
Click the 'Bridge' button to start the transfer.
Caution: 0.5% of tokens are burned for each transaction.
In the Explorer section, you can view the on-chain results of bridge transactions and the history of token burns.
Key Features:
View details of each transaction
See the amount of 0.5% tokens burned
Track cross-chain transaction status
In the Transaction section, you can see the history of bridge transactions for each user.
Information Provided:
Transaction dates
Originating and destination chains
Transfer amount
Burned amount
Transaction status
The process of bridging AUC tokens using LayerZero involves a few key steps. When transferring ERC-20-based AUC tokens to the Avalanche network, 0.5% of the original tokens on the Ethereum network are first burned. LayerZero then generates a message that is sent to the Avalanche network, where 99.5% of the original amount of AUC tokens are minted to AUCa. The minted tokens holds the same value of the original token ensuring that users retain the same value in the new network.
This process is fully bidirectional. If a user wishes to transfer AUCa tokens from Avalanche to the Base network, for instance, the AUCa tokens will be bridged and minted to Base, and 0.5% of AUCa will be burned and 99.5% of AUCb tokens will be minted on Base. This seamless transfer capability is one of the core benefits of LayerZero technology.
The AUC Bridge is written in Solidity version 0.8.23, and its key components are as follows:
This contract is deployed on the main chain (Ethereum) to manage token bridging operations.
Key Functions:
xChainTransfer: Initiates cross-chain token transfer.
lzReceive: Receives and processes messages from LayerZero.
Key State Variables:
AUC_TOKEN: Address of the token being bridged.
LZ_CHAIN_ID: LayerZero chain ID of the current chain.
endpoint: Address of the LayerZero endpoint.
trustedRemote: Mapping of trusted remote addresses.
transferFeePercent: Percentage for transfer fees (default: 0.5%).
Key Events:
BridgingInitiated: Triggered when a bridging operation starts.
BridgingCompleted: Triggered when a bridging operation is completed.
Code Explanation
This function initiates a cross-chain transfer. The main steps are as follows:
Validation
Token transfer
Fee calculation and burning
Sending messages via LayerZero
Always use the bridge through the official website.
When transferring large amounts of tokens, test with small amounts before proceeding.
Bridge transactions are irreversible, so proceed with caution.