Understanding the Agglayer

Understanding the Agglayer

As blockchain technology evolves, one critical challenge remains—interoperability For web3 to take off, it needs to be just as seamless as the internet today. Which begs the question: how did the internet become the internet?

The truth is, at the internet’s inception, it was fragmented, made up of multiple disconnected computer networks that struggled to communicate. Protocols such as TCP and IP then came along to solve these problems, building the necessary infrastructure to unite these technologies. 

Web3 suffers the similar challenges, mainly stemming from fragmentation, scalability, security and poor UX. 

Even with protocols built to solve some of these issues, a one-size-fits all solution has proved harder than it seems. For example, to communicate cross-chain, these fragmented protocols rely on using multiple bridges— some of which are not secure. With so many apps, wallets and chains needing to communicate, the UX becomes complicated for the end user.

Simply, monolithic chains, such as Bitcoin and Ethereum, are not fast enough. And while some modular blockchains have solved scalability for their limited users, protocols, none get close to the speed of Nasdaq or Visa. Plus, with every extra chain and protocol in use, fragmentation becomes more severe.

To solve this issue, you need near- infinite tps alongside a unified state, liquidity and users.

But is that even possible? According to the creators of the Agglayer, it is! But what is the Agglayer exactly?

What is Agglayer?

The Agglayer is a neutral cross-chain settlement layer that unifies liquidity, users and state of aggregated chains and posts finality to Ethereum. What that means is that it aggregates all chains so you can get the benefits of multiple chains, layers and protocols to achieve near-infinite tps and a seamless user experience. 

While the Agglayer posts finality on the Ethereum mainnet, it’s not just for Ethereum and Ethereum chains. The Agglayer provides the infrastructure to aggregate all chains—even those outside the Ethereum ecosystem.

This is key to the Agglayer’s mission to unify the entire web3 ecosystem. The Agglayer believes users should be able to move assets across chains seamlessly—with the “feel” of a single chain. 

How does the Agglayer work?

The Agglayer is built up of 4 key parts:

Pessimistic Proofs

Using pessimistic proofs the Agglayer guarantees that no chain can withdraw more assets than have been deposited on the unified bridge. This is important when aggregating multiple chains, to ensure a problem one doesn’t cause a problem on the other. Polygon Labs calls it “chain level accounting”: it allows you to prove facts about any chain regardless of the types of proofs they use—execution proofs, fraud proofs and many more.

Proof Aggregation

While many think aggregation is the key to the Agglayer’s interoperability, that’s not quite so. Instead, aggregation decreases the cost of publishing multiple proofs by bundling proofs from multiple sources into one.

Unified Bridge

The unified bridge is on Ethereum and it allows all assets to move between chains as fungible assets—without wrapping them. There’s no need to wrap and unwrap tokens as Agglayer’s unified bridge is compatible with all chains.

Fast Interop

Layer 2s still rely on Ethereum’s finality. The Agglayer offers interoperability at a latency lower than Ethereum finality, lowering it to seconds rather than minutes.

Benefits of the Agglayer

The Agglayer’s key benefit is its interoperability.

 But let’s dive a little deeper into how it achieves this interoperability and why it stands out from previous solutions:

Native tokens

Having native tokens across multiple systems without having to rely on wrapped tokens makes for a better user experience and easier interoperability.

Safe cross-chain assets

Bridges are not always secure and that risk multiplies when you rely on more than one. Agglayer removes the need for multiple bridges, and instead relies on a performant ZK prover while inheriting Ethereum’s security via publishing Pessimistic proofs on the Ethereum mainnet. This allows you to remove the stress of security from interoperable protocols and platforms.

Compatibility

While the Agglayer may have features which seem competitive, the Agglayer isn’t about operating alone, it’s about forging connections between chains. It’s compatible with shared sequencers, intents and other cross-chain infra. This allows developers to benefit from the best features of multiple protocols and chains simultaneously; which is what interoperability is all about.

Messaging

The Agglayer stands out from other interoperability solutions as it is primarily designed for passing assets across chains rather than messages. However, the Agglayer can and does pass messages between chains too. 

Chain Abstraction

The Agglayer allows for easy use and implementation of chain abstraction using its bridge and call library. To explain, the Bridge and call function allows users to execute a single transaction on their end, when behind-the-scenes they are executing multiple transactions on multiple chains. This makes interoperability much more seamless than was previously possible.

For example, you might want to bridge funds from Ethereum to Polygon zkEVM, then swap your ETH into an ERC-20 token, then move those assets to X layer, then buy an NFT. Previously, you’d have to execute each step yourself, but with Agglayer, all of those transactions are abstracted away from the user—providing an experience that feels like it’s on a single chain.

How thirdWeb Uses Agglayer: Bridge-and-Call

thirdweb uses Agglayer as part of its modular contracts. Modular contracts are essentially like building blocks: they are portions of pre-built contracts that can be pieced together to create unique functionalities. One of these unique functions is interoperability. 

Essentially, thirdweb offers a unified interface that allows developers to create cross-chain modules for chains and protocols.

Creating such modules was possible since many chains and protocols that support cross-chain functionality rely on similar functions, including:

  • A function to handle sending cross-chain payloads and tokens
  • A function to handle receiving cross-chain payloads and tokens
  • Setter and getter functions for their version of a router

To put it simply: when the modular contract initiates a cross-chain transaction using the Agglayer, it calls Agglayer’s bridge, which then executes the cross-chain transaction seamlessly. 

For more information, check out our blog on creating a unified interface with modular contracts.

How You Can Use Agglayer

If you want to get started with Agglayer, check out the Rust implementation of the Agglayer via GitHub; and Brian Seong’s tutorials on Agglayer’s Unified Bridge and Pessimistic proofs.

Agglayer is all about connecting chains and protocols to build an interoperable blockchain ecosystem with a user experience akin to the internet. With thirdweb, web3 developers have a comprehensive toolkit to build the Agglayer platform that fits them. 

So, if you’re a developer, why not start building on Agglayer with thirdweb? 

thirdweb fully supports all Polygon networks out of the box, including Agglayer. Plus, thirdweb Pay now supports chains built on the Agglayer, allowing users to access onramps and Web3 payment solutions that accept fiat or crypto.

Whatever you’re building with Agglayer, thirdweb's full-stack toolkit can simplify your development process, so you can focus on innovating.