Cross-Chain Bridge
The cross-chain transfer mechanism enables users to transfer tokens seamlessly between different blockchain networks. The process involves locking tokens on the source chain, verifying the transaction through a decentralised network, and minting tokens on the destination chain.
Key components include the ListaOFTAdapter, ListaOFT contracts, LayerZero endpoints, and off-chain services such as the Lista Guardian, Decentralised Verification Network (DVN), and Executor. These components work together to ensure secure, reliable, and efficient cross-chain transfers.
1. Main Contract Structures
ListaOFTAdapter
Transfer Limiter: Enforces transfer limits to manage liquidity, prevent spam, and ensure compliance with transfer policies.
Emergency Switch: Halts all transactions at the first sign of trouble, providing a sharp measure to avert potential crises.
Token Locker: Locks tokens when transferring from BSC to Ethereum and unlocks tokens when transferring from Ethereum to BSC.
LayerZero
LayerZero Endpoint: Facilitates cross-chain communication using the MessageLib library.
ListaOFT
Transfer Limiter: Similar to the one in ListaOFTAdapter, ensuring transfer control on the receiving end.
Emergency Switch: Similar to the one in ListaOFTAdapter, providing emergency halting capabilities.
2. Off-Chain Services
Lista Guardian
An off-chain service that continuously monitors the cross-chain bridge
Halts all cross-chain transactions in case any emergency situation arises
LayerZero
Decentralised Verification Network (DVN)
Verification: A network of decentralised nodes that verify cross-chain transactions before execution to ensure their validity and prevent fraudulent activities.
Executor
Transaction Execution: Commits the verification results from the DVN and executes the lzReceive() method to process the transaction on the destination chain.
3. Cross-Chain Interaction Flow
From BSC to Ethereum:
User A initiates a transfer by sending a request with amount X of tokens.
The ListaOFTAdapter processes the request, applying the Transfer Limiter and Emergency Switch checks.
The ListaOFTAdapter locks the amount X of tokens.
The request is sent to the LayerZero Endpoint on BSC.
The message is broadcast and verified by the Decentralized Verification Network (DVN).
Upon verification, the Executor calls lzReceive() on the LayerZero Endpoint on Ethereum.
The LayerZero Endpoint on Ethereum forwards the request to the ListaOFT contract.
The ListaOFT mints the equivalent amount of tokens to User A's address on Ethereum.
From Ethereum to BSC for User B:
User B initiates the transfer with amount Y of tokens.
The ListaOFT processes the request, applying the Transfer Limiter and Emergency Switch checks.
The ListaOFT burns the amount Y of tokens.
The request is sent to the LayerZero Endpoint on Ethereum.
The message follows the same path through the DVN and Executor as described for User A.
Upon verification, the Executor calls lzReceive() on the LayerZero Endpoint on BSC.
The LayerZero Endpoint on BSC forwards the request to the ListaOFTAdapter contract.
The ListaOFTAdapter unlocks the equivalent amount of tokens to User B's address on BSC.
4. Security Measures
Transfer Limiter: Ensures proper management of liquidity and prevents malicious transfers by enforcing strict transfer limits.
Emergency Switch: Acts as a critical safeguard to halt all transactions at the first sign of trouble, preventing any unauthorised minting of tokens. Both emergency switches are controlled by the Lista Guardian, which can halt transactions by switching on the emergency switch on both chains when abnormalities are detected.
Lista Guardian:
Emergency Switch: An off-chain service that can halt transactions during emergencies by switching on the emergency switch on both chains.
Continuous Reconciliation: Ensures accurate token supply across chains through all-line reconciliation processes.
Large Transfer Alert: Monitors for unusually large transfers to detect and mitigate potential attacks.
Last updated