Technical Architecture

Preface

A cross-chain bridge is a form of decentralized application that facilitates the transfer of assets between two blockchains. It augments the utility of tokens by facilitating cross-chain transactions between distinct blockchains. Typically, a cross-chain bridge entails locking or destroying tokens on the source chain via a smart contract and unlocking or minting tokens on the destination chain via a second smart contract.

Typically, token bridges employ a cross-chain communications protocol for the specific purpose of moving tokens between blockchains. In practice, a cross-chain bridge is a particular use case for a cross-chain messaging protocol, with most bridges merely providing application-specific services between two blockchains. In other instances, they are used to facilitate a broader range of applications, such as cross-chain decentralized exchanges (DEXs), cross-chain money markets, and more generalized cross-chain functionality.

Let’s explore the key components that make these bridges function effectively:

Smart Contracts: Smart contracts are autonomous and self-executing agreements that are deployed on blockchain networks. They play a crucial role in cross-chain bridges, acting as intermediaries to facilitate and validate transactions between different chains.

Oracles: Oracles serve as a vital bridge component, providing external data and real-world information to smart contracts. They ensure that cross-chain transactions are accurately executed based on predefined conditions and parameters.

Consensus Mechanisms: They employ consensus mechanisms to achieve agreement between different blockchain networks. These mechanisms vary depending on the specific bridge design but often involve a combination of Proof of Authority (PoA), Proof of Stake (PoS), or other consensus algorithms.

How does UniRouter Bridge work?

Protocol Architecture

Key Components of the Protocol

  • UniRouter Bridge Contract: Responsible for handling deposit and withdrawal requests, with an identical contract deployed on each chain.

  • Verify Contract: Deployed on a selected under-layer, this component is tasked with the verification of the asset and data communications.

  • Recursive Verify Contract: The Recursive Verify Contract plays a pivotal role in UniRouter, especially when dealing with multiple chain contracts. It is engineered to perform additional recursive verifications, serving two primary functions:

    • Minimization of On-Chain Verifications: It strategically reduces the number of proof verifications conducted on-chain, optimizing resource utilization.

    • Cross-chain Transaction Verification: It ensures the accuracy and integrity of transactions across different chains by validating the correctness of cross-chain transactions through recursive verifications.

Protocol Workflow

  • Dapp: Offers products to users and generates transaction data.

  • Sequencer: Manages transaction ordering and submits data to the chain and Validator.

  • Validator: Responsible for generating and managing tasks for Provers:

Role and Responsibilities: The Validator emerges as a crucial component within the UniRouter protocol, tasked with orchestrating provers, generating witnesses for them, accepting the proofs they generate, and subsequently, uploading these proofs to the chain.

Decision-Making and Coordination: The Validator is entrusted with making pivotal decisions and coordinating the network’s operational mode, which encompasses:

Cross-chain Transaction Management: Identifying and managing the existence of cross-chain transactions between rollups.

Proof Generation and Aggregation Management: Overseeing the speed at which proofs are generated and managing the extent of off-chain aggregation to ensure seamless and efficient network operations.

Last updated