Exploring Ethereum's Ecosystem of Layer 2 Blockchains
Summary:
- On the most basic level, Layer 2 solutions solve scalability concerns of L1s like Ethereum by separating computation/storage and settlement/finality
- A vibrant ecosystem of L2 chains has emerged with Arbitrum, Optimism, Polygon, Starknet, and ZkSync attracting 5b$+
- Our view is that Ethereum (L1) increasingly moves to being a settlement layer first and foremost, with the bulk of the data-intensive activity moving to L2 chains
Introduction - What is a Layer 2 Blockchain?
Rollups are a type of Layer 2 scaling solution that bundles or “rolls up” sidechain transactions into a single rollup block and posts to the Ethereum chain. This allows layer 2 transaction data to be available on Layer 1 any time it is needed for validating a state transition.
On-chain data assures data availability, however, moving it off-chain only guarantees that one could verify the integrity of the data if it’s actually present. Scalability improvements in L2 rollups come from a lack of reliance on Layer 1 storage, as the sidechain state is maintained off-chain.
You can think of scaling solutions as going from everything done on Ethereum to Ethereum serving as the settlement layer for off-chain interactions. This requires mechanisms to verify the correctness of data. Validity proofs (ZK rollups) & fraud proofs (optimistic) are promising implementations that differ in how they ensure the validity of transactions off-chain.* More details on how they respectively work below.
"The Ethereum ecosystem is likely to be all-in on rollups (plus some plasma and channels) as a scaling strategy for the near and mid-term future." - Vitalik Buterin
Source: Delphi Digital
Layer 2 (L2) blockchains refer to separate blockchains that help Ethereum scale but symbiotically need Ethereum to operate. A large ecosystem of L2 chains has emerged, which consists of blockchains leveraging the security guarantees of Ethereum while offering significantly cheaper transaction fees for on-chain activity.
There is currently $5.25B of total value locked in the Ethereum Layer 2 ecosystem with an average transfer fee of $0.144. The most popular Ethereum Layer 2 blockchains based on TVL (total value locked) and daily active users are Arbitrum, Optimism, Polygon*, ZKSync, and StarkWare.
Polygon is technically a sidechain at the moment, but it will be transitioning to a ZK-EVM rollup architecture in the near future. A beginner's guide to Polygon by Cointelegraph can be found here.
As more dApps (decentralized applications) and DeFi protocols deploy on L2 chains to take advantage of their scalability, usage of Ethereum's L2 ecosystem continues to steadily increase.
Source: Dune
Alloy Insight
There are three desirable characteristics of a blockchain: decentralization, security, and scalability. According to the blockchain trilemma, a simple blockchain architecture can only meet two of the three requirements. Both Bitcoin and Ethereum, the top two layer 1 blockchains, have chosen to prioritize security and decentralization. For blockchains to be widely adopted, layer 2 ecosystems must exist since they allow scalability to be achieved externally without sacrificing decentralization or security at the base layer (layer 1). When compared to layer 1 blockchains, layer 2 blockchains achieve exponential increases in transaction speeds and transaction throughput (transactions per second) while charging near-zero transaction fees. Layer 2 blockchains and Ethereum are inherently symbiotic, as all transactions occurring on a layer 2 blockchain are confirmed on Ethereum (L1) for finality. This yields revenue generation for node operators which incentivizes the security of the protocol in a positive feedback cycle. With a layer 2 ecosystem, Ethereum has become more financially accessible and now has the opportunity to be used for a much wider array of use cases, as throughput and transaction speeds are no longer a constraint to DLT (distributed ledger technology). Despite the fact that Layer 2 solutions have solved the blockchain trilemma, in a pure sense, a breakthrough in the base layer architecture has to take place to overcome the ‘trilemma’. The possibility of this is being explored through the use of sharding, which involves activating a network of ‘shards’ that extend from the base layer to manage data storage, transactions, and smart contracts.
While this is beyond the scope of this article, a reasonable question to ask is “why stop at a second layer for improving transaction throughput?” Vitalik Buterin agrees: “One topic that often re-emerges in layer-2 scaling discussions is the concept of "layer 3s". If we can build a layer 2 protocol that anchors into layer 1 for security and adds scalability on top, then surely we can scale even more by building a layer 3 protocol that anchors into layer 2 for security and adds even more scalability on top of that?” More here in Vitalik’s post on the topic.
How Layer 2 Blockchains Work - Optimistic Rollup vs Zero Knowledge Rollup
Layer 2 blockchains such as Optimism and Arbitrum roll up user transactions into bundles that are sent to Ethereum for security checks and settlement. With this design, the base layer is less congested because the transactional load is handled by the nodes that comprise the layer 2 blockchains. How a layer 2 blockchain sends transactions over to layer 1 defines whether it is an optimistic rollup or a zero-knowledge rollup.
Optimistic Rollup
- In optimistic rollups, a "challenge period" is used. Node operators can challenge any transaction they suspect is invalid during a challenge period that can last up to seven days. An invalidation test is run by a smart contract on Ethereum to determine if a transaction is valid. Optimistic rollups are therefore “optimistic” in the sense that transactions are assumed to be valid by default if they pass certain initial parameters. Official documentation with more details can be found here.
Zero-Knowledge Rollup
- Zero-knowledge rollups use cutting-edge mathematical proofs (known as validity proofs) to compute transactions off-chain and then send their compressed data to layer 1 for finality. Zero-knowledge rollups are extremely efficient from a data perspective because their mathematical proofs only require a few bytes of code to submit proof of validity on Ethereum. Because zero-knowledge rollups do not require any form of personalized data pertaining to a transaction, they are referred to as having “zero-knowledge”. Official documentation with more details can be found here.
Alloy Security Tip
While layer 2 blockchains inherit Ethereum's security guarantees for transaction settlement, their native dApps (decentralized applications) inherently introduce their own novel trust assumptions and smart contract risks. In other words, while users can be guaranteed their funds cannot be double spent or compromised as long as their private keys are secure, vulnerabilities inherent to dApps on layer 2s can still be exploited. Always use trustworthy services and proceed with caution on layer 2 blockchains.
Getting Started With Layer Ethereum’s Layer 2 Ecosystem - Bridging
In order to use dApps and DeFi platforms on Layer 2 chains, users must have access to assets on Ethereum and be able to bridge their assets to a Layer 2 chain. There is a handy directory available on Ethereum.org that should be referenced for first-time users. Since most layer 2 blockchains are EVM (Ethereum Virtual Machine) compatible, dApps developed for Ethereum can be redeployed on layer 2s without any changes. This results in a very similar user experience for existing dApps on Layer 2 as on Layer 1, but with significantly lower gas costs.
Daily Users, Total Value Locked, and Popular dApps on Ethereum’s Layer 2 Blockchains
After bridging their assets to layer 2 blockchains via their cryptocurrency wallet of choice, users can interact with a wide range of permissionless dApps and DeFi protocols. We can derive two interesting metrics from the chart above. The number of Layer 2 transactions has recently surpassed the number of Layer 1 transactions for the first time. Arbitrum and Optimism, both Optimistic Rollup networks, are the two most popular Layer 2 solutions based on daily transactions. The pattern holds true beyond a 24-hour timeframe and it is not surprising given that they both launched their public main nets before any zero-knowledge rollups.
Polygon - Evolving From a Sidechain to a Rollup
Polygon, formerly known as Matic Network, is an Ethereum scaling solution from the perspective of developers. Polygon is a sidechain that operates in parallel with Ethereum. Polygon uses its own proof-of-stake consensus mechanism (utilizing MATIC tokens). As a result, Polygon doesn't inherit Ethereum's security and decentralization guarantees like Arbitrium and Optimism. Polygon is able to outperform Ethereum in transaction throughput and significantly reduce transaction costs for users, however, it is rapidly approaching its limits as a result of its popularity. When the Polygon network was congested during previous cycles, transaction costs exceeded $20, resulting in a disappointing user experience. As a result, a lot of research and development by the core team is focused towards introducing a ZK-rollup into the Polygon ecosystem. Nevertheless, Polygon is recognized as a positive addition to the Ethereum ecosystem even as a side chain because of the immediate scalability it offers to users and dApps who leverage it’s EVM compatible blockchain.
- Bridging to Polygon
→ https://wallet.polygon.technology/login/
- DeFi TVL
→ $1.12B
- Top DeFi Protocol by TVL
→ Aave
Arbitrum
Arbitrum is one of the most mature L2 ecosystems and has a wide variety of active DeFi applications. Arbitrum is an optimistic rollup with transaction fees ranging from $0.02 - $0.07 on average.
- Bridging to Arbitrum
→ https://bridge.arbitrum.io/
- DeFi TVL
→ $895.37M
- Top DeFi Protocol by users
→ UniSwap
Optimism
Optimism aims to be the most simple, secure, and fastest L2 blockchain and maintains close ties to the Ethereum community through incentivized liquidity mining campaigns.
- Bridging to Optimism
→ https://app.optimism.io/bridge/deposit
- DeFi TVL
→ $613.6M
- Top DeFi Protocol by users
→ UniSwap
The scalability of blockchains is a mission-critical aspect of their adoption. With Layer 2 solutions, the exponential growth of users who use DeFi to access, store, and exchange value will not be stunted. While the blockchain trilemma is an ongoing challenge, it is expected to be overcome in the near future. Therefore, centralized fintech solutions that offer sufficient throughput to their customers may start to compete with their equally capable DeFi counterparts for market share sooner than we think.
Layer 2 blockchains like Arbitrum and Optimism make DeFi more scalable and more accessible. dApps like UniSwap, Aave, SushiSwap are used by tens of thousands of users every day on Layer 2 blockchains. Even though the technology stack is relatively new, the rate of adoption is proving its apparent product-market fit. With Layer 2 blockchains, transaction costs are lower and throughput is faster, allowing for new use cases for blockchains, further increasing the value proposition of DeFi.
Our view is that Ethereum (L1) increasingly moves to being a settlement layer first and foremost, with the bulk of the data-intensive activity moving to L2 chains.
*Source: Delphi Digital