Cover photo

Unified Bridge: A Critical AggLayer Component For Interoperable Chain Experience

Unified bridge (prev.  LxLy bridge) is a critical AggLayer component, allowing AggLayer to solve fragmentation efficiently and make Web3 feel like the internet. As one of the first components to go live on AggLayer, the unified bridge is a promising solution for seamless cross-chain transfer of assets. However, there are many misconceptions and confusion around the unified bridge & its benefits. Like, how the unified bridge is associated with AggLayer? Or can it tackle the issues of traditional bridges? Let’s drill down to discuss what exactly the AggLayer unified bridge is and learn its key features and benefits. Before that, let’s quickly get an overview of AggLayer. 

Brief Overview of AggLayer

AggLayer is an innovative interoperability layer that connects diverse chains together, creating a unified ecosystem of Layer2s. Using AggLayer, Layer2s, and Layer3s, which are on a different protocol, can connect and benefit from trustless messaging and, most importantly, access to shared liquidity. These attributes make AggLayer a specialized protocol focusing more on assets than general-purpose protocols. Though it focuses on seamless cross-chain interaction, AggLayer should not be confused or thought of as just a bridge. The bridge (unified bridge) is a critical component of AggLayer for asset transfer, but it is designed to handle asset transfer and cross-chain execution of native assets while also providing high security and low latency for all the connected chains. Read more about AggLayer from this detailed article: 

How Polygon’s Aggregation Layer Brings a New Phase in Rollup Interoperability?

Now, let’s dive into unified bridges. The whole overview will be based on our deep dive, plus  Brain Seong’s (Senior Dev Rel at Polygon) research paper. 

Understanding the concept of Unified Bridge

AggLayer’s unified bridge (Prev. LxLy bridge) is a bridging solution that enables cross-chain asset exchange between diverse chains, for example- 

  • Layer2 to Layer2 or 

  • Layer2 to Layer1, or 

  • Layer1 to Layer2. 

The bridge currently supports two bridging transactions; ‘Assets’ and ‘Message’.  For this, the unified bridge keeps a smart contract that is deployed on Layer1 Ethereum, providing a common, safe point for the transfer of native assets (never-wrapped tokens) for all the chains connected in the AggLayer ecosystem. Also, it has a separate contract deployed on Layer2s that interacts with the contract on Layer1.

The unified bridge has two main components that uphold its entire working mechanism. First is the on-chain contracts, and then there is the off-chain services. Here, the on-chain bridge contract acts as a interface, allowing users and developers to initiate transactions cross-chain and allow contract calls on the destination chain. Whereas, off-chain bridge service includes other key components for seamless bridging, such as chain indexer framework, transactions APIs, and proof generation APIs.  

Now, let’s talk about some of the key aspects of Unified Bridge, that allow it to stand apart from the traditional bridging solutions:

  • Bridge’s Data structure- The data structure in unified bridge consist of a giant merkle-tree that includes; Local Exit Root & Local Index, Rollup Exit Root, Mainnet Exit Root, and Global Exit Root, L1 Info Tree, Global Index. 

All the cross-chain transactions in Unified Bridge get recorded in Sparkle Merkle Tree, known as Local Exit Root & Local Index. Each chain connected on AggLayer will have its own ‘Local Exit Root’ that will further have ‘Deposit Counts’ and ‘Not used leaf nodes’.

‘Rollup Exit Root’ maintains the merkle root of Local Exit Root of all the Layer2s. Each L2s in AggLayer is accountable to update its Local Exit in PolygonRollupManager.sol. The RollupManager will take this input to update rollupexitroot, which will later update the globalExitRoot. 

Speaking about Mainnet Exit Root, it is quite similar to Local Exit Root, but it is maintained on Ethereum Layer1, tracking all the bridging activities for all the connected Layer2s. Once Mainnet Exit Root is updated, it will update mainnetExitRoot on Layer1’s PolygonZkEVMGlobalExitRootV2.sol.

Finally, there is Global Exit Root, L1 Info Tree, and Global Index. Global Exit Root refers to the hash of rollupExitRoot and mainnetExitRoot. Whereas  L1InfoTree  functions as Sparse Merkle Tree to maintain Global Exit Roots. Regarding Global Index, it works by locating the unique leaf to the new global exit tree. 

Images source: Polygon

  • Cross-chain interaction–  Here’s a overview of how cross-chain interaction happens in AggLayer Unified Bridges: 

1. Bridging Asset from L1→ L2

Bridging assets from L1 to L2 requires transferring assets (like ETH) from Layer 1 (e.g., Ethereum) to any Layer 2 using the BridgeAsset interface:

  • User initiates a bridgeAsset call on L1.

  • Bridge contract on L1 appends the exit leaf to L1’s exit tree and updates the exit root.

  • The global exit root manager on Layer1 appends the updated root to the global exit tree.

  • The L2 sequencer fetches the latest global exit root.

  • User initiates a claimAsset call on L2, providing an SMT proof.

  • The L2 bridge contract validates the SMT proof and, if valid, transfers or mints the asset on L2 on the destination chain. 

2. Bridging Message from L2 —> L1

This involves sending messages (arbitary data) from Layer 2  to Layer 1 using the BridgeMessage interface:

  • User initiates a bridgeMessage call on L2.

  • The bridge contract on L2 appends an exit leaf to L2’s exit tree and updates its local exit root.

  • The updated L2 exit root is sent to L1 for verification.

  • Upon verification, the L1 bridge contract updates its exit root and processes the message.

  • User initiates a claimMessage call on Layer1, providing the necessary proof.

  • The L1 bridge contract confirmthe proof and executes the onMessageReceived process on L1 (if valid).

3. Bridge and Call from L2—>L2

Bridge and call allow cross-chain assets transfer and makes a call on a destination L2 using the Bridge-and-Call interface:

  • User initiates a bridgeAndCall call on the source Layer2.

  • The global exit root on L1 is updated, reflecting the bridging transaction from L2.

  • The destination L2 sequencer fetches and updates the latest global exit root from the global exit root manager.

  • The bridge contract on destination L2 validates the SMT proof against the global exit root.

  • If validity is confirmed, the destination L2 contract processes the claimAsset or claimMessage call to finish.

  • Bridge-and-call Feature– The Bridge-and-call is a feature in Unified Bridge that developers can use to initiate call for cross-chain transaction on the destination chain directly from source chain. Bridge-and-call is a contract that needs to be implemented on the bridge’s interface, so that any functions can be executed on smart contracts on the destination network. Bridge-and-call consists of multiple interfaces, including the two main ones; BridgeExtension.sol and JumpPoint.sol. 

Key features of Unified Bridge: 

The unified bridge (prev. LxLy bridge) is integrated into AggLayer ecosystem to offer the following key features: 

  • Unified liquidity- All Layer2s have the flexibility to connect using a common bridge, and access unified liquidity contributed by various chains.

  • Accessibility- Projects building their Layer2s or using case-specific applications can request creation of L2 rollup in AggLayer and connect to the unified ecosystem. 

  • Polygon CDK: Each rollup can use the same Polygon CDK stack to build their rollups, validiums, or zkEVMs. 

  • Cross-chain communication- All the Layer2s can connect to the same unified bridge to benefit from endless L2 to L2 bridging. 

  • Easy upgradability- All the rollups deployed into AggLayer ecosystem are easily upgradable in accordance with the chain’s own governance mechanism. 

The critical role of a unified bridge in AggLayer 

A unified bridge is critical in AggLayer as it facilitates a unified cross-chain experience for all the chains connecting to AggLayer. Simply stated, a unified bridge offers an interface for developers and users to initiate transactions cross-chain. After that, AggLayer takes accountability for rest of the steps, which include validation of cross-chain message, its acceptance, and claim on the destination chain. 

Note that a unified bridge is among the 4 critical AggLayer components: Pessimistic Proofs, Proof Aggregation, Unified Bridge, and Fast Interop. Let’s understand each of these components one by one to understand how the bridge is linked to other 3s:

  • Pessimistic proof (for security)- Pessimistic proofs are advanced zero-knowledge proofs that provide safety for the AggLayer, ensuring no chain in the ecosystem can withdraw funds without depositing assets to the unified bridge. 

  • Proof aggregation (for lower cost)- Aggregation of proofs refers to collection of ZK proofs from each chain’s state, creating a proof of proofs, and then submitting a single proof on Ethereum to lower the transaction cost.

  • Unified bridge (for native assets)-  AggLayer’s unified bridge allows diverse chains to plug into a unified, single contract. That means, Etereum will see AggLayer as a single contract despite considering the fact that a range of different chains are connected within it. 

  • Fast interoperability (for reduced latency)- Fast interop in AggLayer ensures fast settlement of cross-chain transactions at significantly lower latency than Ethereum. 

You can see that Unified bridge is a component that compliments rest of the 3 AggLayer components, allowing it to offer an ultimate cross-chain experience. 

What challenges Unified Bridge mainly solve? 

More number of Layer2s, especially use-case specific chains, leads to the challenge of ‘Fragmention’. This problem occurs when Layer2s operates in silos, not being able to communicate with Layer2s that are operating on a different protocol. Let’s understand how a unified bridge can offer a solution to these issues:

1. Liquidity Fragmentation:

The AggLayer unified bridge enables seamless liquidity transfers across different L2 chains. By connecting multiple L2s, the bridge creates a unified pool of liquidity that allows assets and tokens to move freely between chains. This eliminates the issue of fragmented liquidity, ensuring that users can access a more liquid and efficient ecosystem regardless of which L2 they are using. Users no longer have to worry about liquidity being trapped within a specific L2. The Unified Bridge enhances capital efficiency, allowing liquidity to be utilized across multiple networks without the hassle of bridging assets manually. It increases the effectiveness of decentralized exchanges (DEXs) and lending platforms that operate across multiple L2s.

2. Complex User Experience (UX) Issues:

The unified bridge eliminates the complexities of interacting with diverse L2s. Instead of forcing users to switch between various wallets or deal with different transaction formats and fee structures, the bridge provides a single point for users to interact with multiple L2s. This improves the user experience (UX) dramatically because users can seamlessly manage their assets, access decentralized finance (DeFi) applications, and execute transactions across different L2s using the same wallet and interface. It removes the friction that comes with traditional bridging system, simplifying interactions and making the blockchain ecosystem more accessible.

3. Developer Complexity:

By providing a common infrastructure and set of standards, the Unified Bridge reduces the complexity that developers face when building applications on different L2s. They no longer need to create custom solutions for each L2 but can instead leverage cross-chain compatibility to build applications that work seamlessly across different networks. This reduces the cost and effort involved in dApps that work across multiple L2s. Plus, it promotes standardization in cross-chain interactions and allows developers to focus on building innovative features, rather than going through the intricacies of each individual chain. 

4. Security-related challenges:

Critical flaws in bridges like front-end phishing attacks and fake burns are some of the most common types of hacks that happes in cross-chain bridges. Remedy’s research says talks about approxiamte loss of $2 Billion in 2022 alone, and that’s huge. Here’s list of similar attacks and how unified bridge in AggLayer can tackle them:

  1. Front end-phishing and inaccurate deposit– AggLayer tackles these problems by adding support for IPFS/ENS deployment services like Planet, or Biconomy for account abstraction, or wallet services like SubWallet. 

  2. Misinterpreted events- With Pessimistic proofs, AggLayer avoid mishandling of events completely. Example- if user sends 10 ETH to chain A, there’s now way he can claim 100ETH on chain B. Proofs aggressively checks validity of the messages. Even when there’s some malfunction happens on chain B and it approves the message, the amount will be not bridgable as Pessimitic proof in unified bridge will reject it.

  3. Mismatched transactions- Unified bridge doesnot include any ‘off-chain bridge server. Rather, everything is handled by AggLayer infra, ensuring all the transactions matches up and verified through proofs.

Also, the AggLayer unified bridge is resistant to a range of other attacks like Single point of failure (SPOF), Rug pull, smart contract vulnerabilities, fake burn, replayed withdraw, incorrect release, and more. 

5. Coordination Challenges:

The Unified Bridge is designed to focus notably on decentralized governance. While it enables each chain to implement its own custom governance rules, through the unified bridge, it can coordinate more effectively for cross-L2 improvements and upgrades. This approach ensures that the governance of each individual L2 is preserved, but it also allows for unified action if required. The bridge essentially provides an environment where L2s can collaborate on shared standards, such as updates to cross-chain compatibility or new features that benefit the broader ecosystem. It offers a unified approach to ecosystem growth without needing the chains to sacrifice their autonomy.

Tap into AggLayer & Unified Bridge with Zeeve Raas

As an official Zeeve’s rollups-as-a-service (RaaS) provider for AggLayer, Zeeve RaaS offers a high-performance, enterprise-grade infrastructure for all kinds of Layer2s that seek to tap into AggLayer ecosystem. Enterprises or Web3 projects with their own rollup chain or seeking to connect to AggLayer can benefit from Zeeve’s RaaS offerings. Like, you can enable modularity with an altDA layer, decentralized sequencer, wallets, account abstraction SDKs, and 40+ third-party integrations. Also, users can set up a full-fledged CDK chain testnet with Zeeve’s 1-click Polygon CDK Sandbox tool in minutes.

For more details about Zeeve’s rollup offerings, connect with our experts. Write your queries/concerns via mail or set up one-to-one call for a detailed discussion. 


Zeeve logo
Subscribe to Zeeve and never miss a post.