🛠️How it works
Working
This bridge uses LayerZero to provide inter-blockchain communication, facilitating the transfer of LRTs between Ethereum and Aptos. For transfers from Ethereum to Aptos, it uses a lock and mint technique. First, assets are locked in Ethereum, after which a payload is constructed and delivered to Aptos using LayerZero. Once Aptos receives the payload, it decodes it and mints required assets on receivers address. Conversely, for transfers from Aptos to Ethereum, assets are burned in Aptos and subsequently released in Ethereum.
Apart from LRTs, all other assets supported by AptosBridge can also be bridged through same interface.
LRT Bridge flow
Token Selection: Choose from LRTs directly on the bridge interface.
Amount Specify: Enter the amount of LRT you wish to bridge.
Receiver Specify: Connect the receiver's address on the destination chain.
Transaction Confirmation & Updates: Confirm your transaction and receive real-time progress updates.
Receive: Receive LRT directly on the destination chain to the desired receiver address.
Ethereum bridge contracts
This contract mainly responsible for locking/releasing LRTs and sending/receiveing message using LayerZero. It consists of two main functions -
bridgeLRT
- This function is responsible for locking LRT, constructing payload and sending payload using LayerZero.lzReceive
- This function is called by LayerZero endpoint for receiving messages. It decodes the received payload and releases locked LRTs
Aptos Bridge Contracts
This contract is responsible for minting/burning LRTs and sending/receiving messages using LayerZero
send_coin
- This function is responsible for burning assets, constructing payload, and sending it using LayerZerolz_receive
- This function is called by LayerZero endpoint for receiving messages from LayerZero and minting assets.
Last updated