> For the complete documentation index, see [llms.txt](https://docs.unirouter.io/dataroom/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.unirouter.io/dataroom/technical-architecture-and-technology-features/technical-architecture.md).

# 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?`**

<figure><img src="/files/OIfFANw516gYpo6wCF9u" alt=""><figcaption></figcaption></figure>

### 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.<br>
* Verify Contract: Deployed on a selected under-layer, this component is tasked with the verification of the asset and data communications.<br>
* 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.<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.unirouter.io/dataroom/technical-architecture-and-technology-features/technical-architecture.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
