AggLayer: A New Blockchain Ecosystem Paradigm

Cybergen
7 min read3 hours ago

--

Similarly to pre IP/TCP internet, the current Web3 ecosystem organically developed itself throughout a variety of silos naturally leading to an ever-increasing liquidity and state fragmentation. At present, no single monolothitic chains can single handedly process internet-level transactional load while modular ecosystems like Optimism or Arbitrum are inherently stymied by fragmentation. Thus, in spit of a seamless and united network experience similar to the internet, Web3 is plagued by limited interoperability and complex UXs severly hindering further development towards mainstream adoption. As such, it would appear that the market is ripe for a shift from the monolothitic and modular design towards a more flexible approach like Polygon AggLayer enabling Web3 protocols to aggregate their strength into a network agnostic unified framework.

What is Polygon AggLayer?

Launch in early Q1 ’24, AggLayer is an interoperability protocol aiming to unite the divided blockchain landscape into a web of ZK-secured L1 and L2 chains allowing users to perform trustless cross-chain transfer of message and token among a wide range of blockchain architecture.

AggLayer architecture, Source: Polygon Docs

Yet, it is important to underline that although AggLayer enables interoperability, it is not merely another interoperability solution or mega-network from the likes of Optimism Superchain but something new: an aggregated solution. Indeed, through aggregating chains and posting finality to Ethereum, the AggLayer unlocks a wide range of interoperability and liquidity features for the entire Web3 space:

  • Unified liquidity — Possibility fo direct transfer fungeable tokens without the need for wrapped tokens creating further liquidity fragmentation.
  • No Fee extraction — No cost upon joining AggLayer and no 7 days fraud-proof window for token transfer from L2 to L1.
  • Agnostic architecture — No mandatory tech-stack or network design on the contrary to other modular frameworks (Arbitrum, Optimism, …)
  • One time set-up — Once a chain joins AggLayer, it get access to every other connected chains in contrast to other interoperability solutions such as Chainlink’s CCIP.

Advantages of AggLayer

  • Unified liquidity and user pool — Single point of entry to the liquidity and user base of all connected chains eliminating the need for bootstrapping liquidity on individual chains.
  • Cross-chain development — Extensive cross-chain transaction toolkit streamlining the development of complex cross-chain logic.
  • Better UX — Seamless interchain connectivity allowing to abstract away the complexity from the user experience and create a feeling similar to the use of a single network.
  • Extended reach — Built-in connectivity to any AggLayer allowing to maximise the reach of any Dapp to the entire ecosystem.
  • Efficiency — Seamless interactivity among every connected chains enabling a high-level of Dapps specialisation and greater overall ecosystem network efficiency.

How does it work?

From a technical standpoint, Polygon AggLayer relies on three core components:

  • Ethereum Unified Bridge
  • BridgeAndCall() Library
  • Pessimistic Proof
AggLayer architectural design flow, Source: Polygon Docs

Ethereum Unified Bridge

The Ethereum unified bridge is the source of unified liquidity for the AggLayer and can simply be envision as a single bridge contract on Ethereum providing a safe, common access point to transfer native tokens of all connected chains. Technically speaking, it encompasses two types of primitives — bridgeAssets and bridgeMessage — respectively extending traditional bridging functionalities to cross-chain token and message transfers.

Additionally, each connected chain has a local copy of the unified bridge root which couple with the ZK-pessimistic proof alleviates all risks induced by third party bridges or the need for Ethereum withdrawal like in modular design.

BridgeAndCall Library

The BridgeAndCall is an open-source library allowing developers to program cross-chain logic in smart contracts by essentially merging the processing of cross-chain transfer with the ability to trigger a contract on the recipient chain. As such, using this library, developers can easily create complex multi-chain computation with seamless and near-instantaneous user experience requiring only one transaction signature for the entire workflow.

Case Study

Alice is an Ethereum user and sees a character’s skin on a gaming chain built with Polygon CDK that she wants to buy — and she wants to buy it first by swapping ETH to MATIC on Polygon zkEVM because it has deeper liquidity than the Polygon CDK chain.

Transaction workflow happening in a single click

  • Transfer ETH from Ethereum to Polygon zkEVM
  • Swap ETH for POL
  • Transfer the new asset from Polygon zkEVM to the gaming chain;
  • Mint the gaming NFT.

As demonstrated through this short example, Polygon AggLayer is offering the best of both worlds by providing the scale of modular architecture with the unified liquidity and UX of monolithic systems.

Pessimistic Proof

As highlighting above in this article, a shared bridge allows users to seamlessly send and receive fungible assets between L2s, providing far better UX than third-party bridges resulting in users receiving wrapped synthetic tokens or native bridges imposing extended time delays of up to seven days in the case of Optimistic rollups. However, it also comes with a novel challenge as without a proper safety mechanism, a malicious actor on one chain could potentially exploit the entire bridge. Hence the need for the Pessimistic proof, a custom-built zk-proof ensuring safety for cross-chain transactions.

Pessimistic Proof Design

From the AggLayer’s perspective, the unified bridge is a vast network chains growing in complexity as more chains are joining. Thus to keep the network safe, the AggLayer needs a full view of all the transfer of assets and messages across the chains in order to guarantee that at no point any chain withdraw more from the bridge that what has been deposited on the chain’s L1 contract. To do so, it needs to verify that at any time:

  • Each chain update is done correctly
  • Each chain internal accounting is correct — meaning that they didn’t try to withdraw tokens they didn’t have
  • All chains accounting checks out

In other words, if Chain A says it has 100 POL deposited on the bridge, the AggLayer keeps track to make sure it does not subsequently attempt to withdraw 200 POL, whether through equivocation or an exploit by some malicious actor.

Pessimistic Proof ZK Flow

Each chain connected to the AggLayer maintains a local exit tree tracking all withdrawals from the chain. Therefore, using the root of each chain’s local exit tree, the AggLayer can build a global view of all withdrawals from all chains on the unified bridge, called the global exit tree. However, this latter being committed to the L1, the AggLayer needs to cryptographically ensure that all exit trees composing the global exit tree are valid. To do so, the network generates a pessimistic proof as follows:

Step 1

  • Chain A communicates the three following inputs:
  • Most recent updated state of the chain exit tree
  • List of new withdrawal included in the current update
  • Expected new local exit root state

Step 2

  • AggLayer compute the new local exit root using the chain most recent updated exit tree and the communicated list of new withdrawals
  • Comparison of the result with the communicated expected new local exit root state
  • Generation of a proof

Step 3

  • Using the pessimitic proof output, the AggLayer is computing the bridge balance of each chain
  • If any chain is found to have a negative balance, the AggLayer determines that the chain attempted to withdraw tokens that were not deposited into it and flag the chain update as invalid preventing any pessimistic proof containing that chain state to be validated on the L1 in order to keep the network safe.

So in summary, the AggLayer scrutinize all chain balances on the unified bridge and generate a cryptographic proof isolating bad actors to prevent them from draining the bridge.

AggLayer use cases

By unlocking atomic composability and creating a unified environment allowing developers to create a superior cross-chain user experience similar to Web2, AggLayer is unlocking a wide array of new use-cases all throughout the Web3 space:

DeFi

  • Deep Liquidity — Users on any aggchain can experience native tokens of any connected chains allowing new market designs with more efficient and deeper liquidity pools.
  • Dapp composability — Developers can create interoperable applications leveraging liquidity, smart contracts and users from multiple blockchain allowing for a seamless integration of DeFi “Legos” across ecosystems.
  • Extended Users pool — Developers can soleley focus on answering best their use-cases without worrying about ecosystem lockup.
  • One-click transaction — The AggLayer’s near-instant cross-chain message transfer reduces complexity, costs, and security risks compared to current cross-chain swapping methods.
  • Interoperable stablecoins — Stablecoins can move freely across chains without wrapping, creating unified liquidity pools accessible on all connected blockchains.

Gaming

  • New interoperability design — Unified gaming ecosystem where in-game assets and player achievement seamlessly move between chains.
  • Web2 like experience — Similarly to a Steam account enabling players to play Xbox and Playstation games, AggLayer enable simultaneous access to a wide range of blockchain gaming ecosystems.

RWA

  • Cross-chain RWA marketplace — Unified marketplace where tokenized real-world assets like real estate and collectibles can be traded across any connected chain while enhancing overall market liquidity and depth.
  • Cross-chain fractional ownership — Users on all connected chains can access shared ownership opportunities for high-end assets like real estate or collectibles.
  • Multi-asset fund aggregation — Fund managers can create and manage multi-asset funds containing tokenized RWAs from different blockchains in compliance with local regulations.
  • Data markets — Users can better take control and monetize valuable data sets.

In brief, by improving UX and lowering the barrier to entry in the Web3 space, AggLayer is amplifying the value of existing blockchain capacity while simultaneously providing a path for everyone to benefit from the overall growth in blockchain innovation, value creation and usage.

Conclusion

While still in its early days, the AggLayer might represent the next natural evolutionary step of blockchain design and, similarly to the IP/TCP revolution, consolidate the fragmented Web3 space into a unified web of hyper-specialised protocol prime for mainstream adoption. Yet, only time will tell if the Polygon community is able to put this vision to fruition and attract other significant partnerships and network integration that could indirectly allow AggLayer to tap into other significant user base (Telegram with TON, …).

--

--

Cybergen

If you want to read more or dive deeper into on-chain analytics go check out my website: https://cybergenlab.wordpress.com/