Wizard Bridge V2 Design Document
Objective
The goal of this project is to build a decentralized bridge called Wizard Bridge. This bridge will initially support the Binance Smart Chain (BSC) and Arbitrum, but it is designed to be expanded to other EVM-compatible chains and potentially non-EVM chains in the future.
System Components
1. Smart Contracts
Smart contracts need to be developed and deployed on each supported chain. The responsibilities of these contracts will include:
Locking and unlocking assets during transfers.
Receiving and verifying proof of locking from relayers.
Minting and burning wrapped tokens on the destination chain (if necessary because tokens like usdt may already exists on destination chain so we just need to lock or unlock in that case).
2. Relayer Network
The relayer network is a decentralized network responsible for observing events on one chain and submitting proof to the corresponding contract on the other chain.
Key considerations:
There will initially be 15 relayers.
Each relayer must stake a certain amount of wzb tokens to participate.
Withdrawal of staked tokens will be subject to a 30-day unbonding period.
3. Multisig Approval Mechanism
A multisig approval mechanism will be implemented to ensure transactions are approved by at least 51% of the relayers before they're finalized.
4. Slashing Mechanism
In the event a relayer acts dishonestly or delegates a bad transaction, the staked tokens will be slashed.
Development Phases
Design Phase: Detail out system components and mechanisms further. Define the logic for each smart contract, the structure of the relayer network, the multisig approval mechanism, and the slashing conditions.
Development Phase: Develop smart contracts for both chains and the relayer system. Code the multisig approval mechanism and the slashing mechanism.
Testing Phase: Thorough testing on local networks and testnets. Consider using tools like Truffle Suite for testing the smart contracts.
Audit Phase: Have the system audited by a professional auditing firm to ensure security and correctness of the code.
Deployment Phase: Deploy the smart contracts on the mainnets and start the relayer network.
Maintenance Phase: Monitor the system for any issues, ensure relayers are behaving honestly, and handle any potential system upgrades or governance matters.
Risks and Mitigation Strategies
Smart Contract Vulnerabilities: Use well-known, audited smart contract templates wherever possible. Have the final contract code audited by professionals.
Relayer Dishonesty: Implement a strong slashing mechanism to disincentivize dishonest behavior.
Chain Congestion or High Fees: Consider Layer-2 solutions or other scalability options to lower costs and improve speed.
Last updated