How are Layer 2 Solutions Helping Ethereum Scale?
Blockchain technology is quickly evolving, and enterprises are starting to take notice. Many businesses are investigating how they can use blockchain to improve their operations.
Gartner Research predicts that the business value generated by blockchain will grow rapidly, reaching $176 billion by 2025 by 2025 and $3.1 trillion by 2030.
However, as the complexity of the technology increases, so does the need for competent developers who understand how to build and deploy applications on top of blockchain networks.
In this blog post, I'll explore some of the most common layer 2 scaling protocols for Ethereum and explain how they are valuable for enterprise applications.
But before I dive into that details let’s take a look at exactly what ‘Scalability’ is, why it matters, and how Layer2s come into the picture.
I'll also provide some tips for how to get started with layer 2 deployment. So if you're interested in learning more about Ethereum scaling solutions, keep reading!
We must find a workaround to solve the Scalability Trilemma for Blockchain
First coined by Vitalik Buterin, blockchain trilemma refers to the difficulty that blockchains face in acquiring security, scalability, and decentralization at the same time. As we continue to evolve, one of the key challenges that blockchain developers are struggling to solve is the ability of a blockchain network to handle an increasing volume of transactions, without compromising security or performance.
With the growing popularity of cryptos and decentralized applications, it is clear that blockchain networks are currently struggling to keep up with demand. As a result, transaction fees have skyrocketed and transaction times have slowed to a crawl. The below chart shows the transaction fees on Ethereum continued to spike even when the price was going down.
(Source: Binance Research Report 2022)
The good news is, instead of such a high transaction cost and low processing speed, we have seen 4.5X more transactions happening on Ethereum than on VISA in 2021. But there is no point in denying that these issues need to be addressed if blockchain has to reach its full potential.
There are a number of reasons why scalability is so important:
This has a direct impact on blockchain adoption, as businesses and individuals are less likely to use a blockchain if it cannot meet their needs in terms of speed and capacity. Now, you could argue, that the Ethereum merge could fix this, but there are several risk factors associated with this. It’s more like, changing your car’s engine from gas to electric, but keeping the speed same. Jack Niewold has described this beautifully in his recent thread.
However, there are some promising solutions in the works which could help blockchain scale up to meet global demand. But…
A one-size-fits-all blockchain scalability solution doesn’t exist:
When it comes to blockchain scalability, there is no one-size-fits-all solution. There are multiple ways to scale a blockchain. For example:
Improving the Consensus Mechanism:
The consensus algorithm is one of the key components of a blockchain that determines its scalability.
For instance, Bitcoin, and Ethereum use Proof-of-Work (PoW) consensus algorithm which is energy intensive and slow. This has led to the development of several projects that aim to improve blockchain scalability by upgrading the consensus mechanism.
Take the example of Solana. They use an innovative Proof-of-History (PoH) consensus algorithm which is much faster and makes it process 50000 transactions per second. But the problem of consistently going down raises questions about its decentralization.
That’s not the case only with Solana. Centralization remains the common tradeoff between layer1 blockchains that tried to become more scalable. Thus, while upgrading the consensus algorithm can improve blockchain scalability, it can also affect privacy and decentralization.
One potential solution could be Sharding:
Here the blockchain is divided into multiple shards or smaller pieces. There are a few different ways to implement sharding, but one common approach is to use “sharded chains”.
In this setup, each blockchain node only stores a copy of the shards that it is responsible for. This helps to reduce the amount of data that needs to be exchanged between nodes, and also allows nodes to process transactions in parallel. Ethereum 2.0, the successor to the current Ethereum blockchain, is taking this route. Two other prominent examples of sharded chains are Polkadot Parachains and Zilliqa.
However, sharding does have some limitations, such as the need for additional communication between shards and the possibility of inconsistencies if shards fail to reach consensus.
Another option for scaling blockchain is to use Layer2 chains:
These are separate blockchain protocols that interact with the main blockchain but are designed to handle a much higher volume of transactions. By moving some of the computationally intensive processes off-chain, Layer2 solutions can greatly increase the number of transactions a blockchain can process.
Hence, the primary benefit of using a Layer2 solution is, that you get hundreds if not thousands of transactions per second by simply delegating computational tasks to a second layer while keeping verifiable proofs on the main chain. As a result, Layer2 solutions have the potential to provide near-instant transaction speeds without sacrificing security or decentralization.
There are a number of different Layer2 solutions that are being developed, each with its own strengths and weaknesses. For the rest part of the blog, we will focus on multiple Layer2 technologies that are now in use and protocols that are being developed on them.
Breaking down popular types of L2 scaling solutions:
The TVL of the entire Ethereum ecosystem is around $39.29B whereas the total value locked combining all Layer2 technologies is currently around $6.04B, which is roughly 15%. And it has been on a continuous rise. The below chart shows how the Layer2 landscape has evolved over last few years:
(Source: L2 Beat)
Here are all the Layer2 technologies that made up this $6.04B value:
Rollups:
Rollups are a type of Layer2 solution that has become very popular in recent years. In fact, data suggests, that they currently hold over 95% of the Ethereum Layer2 market share.
Rollups work by batching many small transactions into a single compressed transaction, which is then submitted to the roll-up smart contract on the Layer1 chain. When this is done, the State for all the transactions is updated. This can be thought of as similar to how zip files work, where multiple files are combined into a single file in order to save space.
They have three main features that make them valuable:
This allows for increased throughput while still retaining all of the security and decentralization of the Layer1 blockchain. The below graphics explain how unnecessary data is ignored and with the help of Merkle roots roll-up system working:
The two major types of Rollups, Optimistic and Zero-Knowledge (ZK) do this differently. While optimistic rollups use fraud proofs, Zk rollups do this with validity proofs.
Optimistic Roll-up:
This is the most used rollup at the moment comprising over 80% of total Rollup transactions. The reason being they are easy to deploy. As the name suggests, they assume all transactions are correct when submitted and a window of 7 days is given for raising disputes. If no fraud proofs are published within that time, assets are released. In case of a successful dispute, the last correct state is restored.
Because of economic incentives and also disincentives for the bad actors, fraudulent activities are rare. Hence, the transactions are processed very fast. However, to withdraw it back to L1, one has to wait till the fraud-proof publishing window ends.
ZK- Roll-up:
They are more computationally intensive and hard to execute on a technical level. But, it is more privacy-focused. It can prove the validity of a transaction without revealing its content.
For example, assume you want to enter a bar and they ask for your ID to prove you are over18. Now, you can use ZK rollup to prove this. How? Well, it can use the Verifiable Certificates issued by the Election Conducting Authority to prove, as you have voted in the last Presidential election of the United States, you must be above 18 years. Without revealing your name, where you live, and other additional details that your original card might have, you just entered the bar.
Along with the transaction batch, validity proof for the same (a ZK-Snark) is also submitted to L1. Now, as transactions are already verified, assets can be withdrawn almost instantly.
As per Vitalik, Though Zk-rollups constitute a very small part of total roll-up transactions today, the future for Zero Knowledge technology is promising. Here’s what he wrote in his blog post:
“…my own view is that in the short term, optimistic rollups are likely to win out for general-purpose EVM computation and ZK rollups are likely to win out for simple payments, exchange, and other application-specific use cases, but in the medium, to long term ZK rollups will win out in all use cases as ZK-SNARK technology improves.”
Plasma:
Plasma chains work by using child chains that are anchored to the main chain. Transactions are then offloaded to these child chains when the mainnet suffers congestion. These child chains can produce their own, independent blockchains giving them a tree-like structure. Each of these chains can serve specific contexts and business needs.
The child chain and main chain can have different consensus mechanisms. Like, optimistic rollup, it also has a fraud-proof mechanism to validate the plasma chain. Each child chain can have its own consensus mechanism for validating blocks.
As it can’t run smart contracts, only basic operations like token transfer and swapping are possible. Also, Plasma chains publish minimal information about the state of child chains. The data availability is off-chain. Hence, they are less secure because the mainnet can not effectively verify transactions conducted on child chains.
Validium:
Both ZK-Roll-up & Validium are L2 protocols that post validity proofs to the mainchain, to be verified by an on-chain verifier contract.
While zk-rollups use on-chain data availability on L1 to store data, Validium stores data off-chain due to scalability limitations on the L1 chain.
Here, block producers don't publish the transaction data on-chain but provide a cryptographic commitment to prove the availability of the data.
Both Validium and Plasma take this approach to separate data availability from consensus and execution. While both Optimistic and ZK- Rollups use Ethereum L1 for storing the final data. The below chart makes this distinction clear:
Sidechain:
A sidechain is simply a separate blockchain that is attached to the main blockchain via a two-way peg. This peg allows for assets to be transferred back and forth between the two chains. And when the asset is withdrawn, it is released on the Ethereum Main chain.
One major advantage of sidechains is that they offer greatly increased scalability. Because transactions are no longer confined to the main chain, they can be processed much more quickly once moved to the side chain using a bridge. This could potentially allow for thousands or even millions of transactions per second.
One thing to note here is, that once an asset is on the side chain, they no longer depend on the consensus of the main chain. With benefits, this also has some risks: The risk of centralization. Who are the validators? How they are chosen? How does the consensus work? Is the bridge even secured? Etc.
Polygon PoS is one of the most successful examples of Ethereum Side Chains.
Multiple L2 Protocols Emerging to Increase TPS and Lower Fees:
Layer2 protocols are starting to emerge as a solution to both high transaction fees and slow transaction times. By using Layer2 protocols, users can take advantage of the speed and security of the underlying Layer1 protocol while also benefiting from increased throughput and reduced fees.
Here are some of the most promising Layer2 protocols based on their market dominance, user adoption as well as potential future applications.
Recommended by LinkedIn
Arbitrum is a Layer2 scaling solution for Ethereum that uses optimistic rollups to process transactions off-chain. It is currently the leading L2 scaling solution with $2.62B in TVL and controls the L2 market share of 43.45%.
According to Layer 2 data aggregator L2 Fees, arbitrum allows for 40,000 transactions per second, with gas fees ranging between $0.11- $0.18 for sending ETH and Swapping tokens.
One big advantage of Arbitrum is its own Arbitrum Virtual Machine. Though this is similar to EVM, it works independently from it and allows fraud proofs to be executed.
dApps originally written for EVM can automatically be translated to AVM. All ERC-20 tokens can also be directly used on Arbitrum.
One more good about Arbitrum is, that it only sends the suspicious part of the transactions back to EVM and not the entire one. It uses multi-round fraud proofs and executes small parts of the transactions until the fraud is detected. This makes Arbitrum faster.
And, it’s no wonder because of these features, it is adopted by top protocols such as Uniswap, Sushiswap, Aave, curve, Balancer, and many more.
Also, it is currently the only L2 with the most centralized exchanges supporting direct withdrawal.
All of them support Arbitrum. One disadvantage is, that it takes around 2 weeks to withdraw funds using Arbitrum.
The below analytics from Coin98 shows the giant Arbitrum ecosystem:
(Source: Coin98 Analytics)
It’s the second most used Layer2 protocol, again built on Optimistic roll-up technology. Currently, it has around $1,84B in TVL with 32.56% L2 market dominance.
Optimism can process 2000 transactions/second. According to L2 Fees data, It takes around $0.18 for sending ETH and $0.26 for swapping tokens.
The key advantage of Optimism over other Layer2 solutions is that it offers near-instant transaction finality.
To deal with suspicious transactions, Optimism sends the entire transaction through EVM. Hence, it’s instant but at the same time, costs more gas compared to Arbitrum.
In the future, Optimism will use interactive fraud proofs to ensure a state of correctness. But this feature is currently under development.
Optimism’s ‘Citizens House’ is another plus in their governance structure. With the launch of ‘Soul-Bound’ non-transferable citizenship NFTs and making ‘$OP’ a gas token but not a governance token, Optimism is aiming to keep a balance between Token Holder (Token House) and Non-token holders’ (Citizen House) interest.
Even Vitalik advocates for the governance structure of optimism:
Major exchanges like:
Also supports Optimistic rollups for deposit and withdrawal purposes.
It also has a widespread deployment of dApps in all major categories including DEXes, lending, bridges, yield protocols, NFT space, and many others. There are over 150+ dApps and integrations running on the Optimism network. Get the entire list here.
zkSync uses the ZK Rollup construction, which preserves the security of data availability that is essential for Layer1 blockchains while allowing Layer2 scalability. Presently it has a total asset-locked value of $66.1M and constitutes 1.17% of the L2 market.
zkSync can process over 10,000 transactions per second and has low fees ($0.05-$0.12) even when congested. With their zkPorter update, it will be able to process 20K+ TPS with another significant reduction in fees.
Unlike optimistic rollups, finality can be reached in 10 minutes using zkSync, which means all assets can be moved between the L1 chain and rollup cost-effectively and quickly.
Its current functionality includes:
(Source: Coin98 Analytics)
More details on the zkSync ecosystem can be found here.
Loopring is a Layer2 scaling solution for Ethereum that uses zkRollups to process transactions off-chain. It has the lowest transaction fees among all L2 protocols. Loopring holds around 3.5% of the total L2 market with $198M in TVL.
Loopring protocol provides the tools developers need to build non-custodial, order book-based decentralized exchange. Unlike Uniswap or Sushiswap, which were built directly on L1 chains, The Loopring team developed the first ever zkRollup powered DEX on L2– The Loopring Exchange. Available data suggests It can settle 2025 trades per second and the settlement cost per trade is roughly 450-800 gas on L1 which is 0.15 to 0.3% of most L1 dex protocols.
Using Loopring L2, ERC-1155 NFTs can be minted for under $1. As per their Quarterly Update Report (Q1/2022), over 3 million NFTs were already minted on Loopring L2 following their official launch of open minting.
In a recent announcement, ‘Game Stop’ shared they are building their upcoming NFT Marketplace on Loopring Layer2.
Metis Andromeda is a Layer2 solution that uses optimistic rollups to process transactions in a few seconds, with just a couple of cents in gas.
It is also referred to as the first "Smart L2" because it is leading the way with SoulBound Tokens for on-chain governance. The on-chain social score and credit system (RPS Matrix) will make use of these tokens.
Instead of relying on external storage solutions, Metis plans to integrate an IPFS-based storage layer benefitting its roll-up structure. An added benefit is this can further reduce gas fees to just cents.
The biggest issue with its ecosystem is by far liquidity. Hopefully, it will be solved with the Metis Marathon campaign, which is a $100M incentive campaign spread over 26 weeks for projects to build on Metis.
Sushi Swap is the first beneficiary of this fund. ChainLink and Aave also confirmed their entry into the Metis ecosystem. With the bear market kicking in, this $100M incentive program can make builders flock to the Metis system.
Apart from that, their Builder Mining Program is another plus, where they give back 30% of transaction revenue collected every month to the dApps deployed on Metis Andromeda.
Projects built on Metis include DeFi, DAO, dApps, NFTs, payment solutions, stablecoins, etc. The top 10 Metis projects according to TVL are shown below.
Get the list of all projects here.
Instead of a single scaling solution provider, Polygon works as a solution aggregator. The platform has already launched multiple solutions that aim to improve user experiences in terms of privacy, scalability, decentralization, and transaction fees. That’s why often it’s called the Swiss Army Knife of Ethereum scaling solutions.
Polygon envisions a roll-up-centric Ethereum future. They are exploring Ethereum scaling solutions from virtually every angle. Though they are exploring both Optimistic and Zk-Rollups, they have more focus on the Zero Knowledge Technology. Even, they have a dedicated $1B fund for ZK-based solutions.
Below are the 4 ZK-Rollup products Polygon is working on:
However, it’s unlikely that all of their products will become successful. Still intriguing to see which one will become groundbreaking. Here’s a list of all other projects Polygon is currently working on, along with information on their status, and the technologies they use:
Blockworks Research shows that the Polygon PoS side chain currently has 10X the number of daily transactions than that of Arbitrum and Optimism combined. Also, the latest data from Alchemy shows that almost 37000+ dApps have been built on Polygon.
Polygon’s PoS chain can actually work as a top-of-funnel customer acquisition channel for its entire suite of solutions. Popular Web2 names like Meta, Reddit, Dolce & Gabbana, Stripe, Addidas, and Prada have already announced their Web3 journey with Polygon.
Layer2 protocols are still in a very nascent stage. As the technology matures, it is likely that the protocols will become increasingly popular, providing a scalable solution for many of the industry's most pressing challenges.
In their recent research report Binance mentioned:
“L2 development appears to be on track to become more and more ubiquitous as we enter the second half of the year and it would not be surprising to see most, if not all, of the top-ranked dApps being deployed on some form of L2”
And, I don’t think, there will be any ‘Winning L2’.
There is no “one to rule them all”
There is no ‘the best’, at least for now. Also, we don’t think there will be just one winner. The future will be one of different L2s solving the scalability issues together.
But which one is good for your business? It depends on your priorities and the functionalities that matter most for your project. Evaluate its:
For example, if you are building a dApp that needs high TPS with ETH-level security, maybe Arbitrum or Optimism is a good choice. But if you need to withdraw assets fast, without waiting for weeks, these two might not suit your needs. Similarly, if you are building a game or NFT project, the Polygon PoS chain might be the right one. If you are building something complex and need a comprehensive toolset, again Polygon can be the go-to option. If you are already a business and want to expand, consider expanding to Loopring, Metis, zk-Sync, or Polygon.
Apart from financial transactions, and minting NFTs, there can be many more areas where cheap crypto transactions will be paramount for adoption. Here’s what Vitalik said about Layer2s in the ‘Korea Blockchain Week’ event:
“...Scalability isn’t just like some boring thing where you just need like cost numbers go down. Scalability, I think actually enables and unlocks entirely new classes of applications. You need to actually send a transaction to create a DNS name, you need to actually send the transaction to recover your account, and you need to actually send a transaction to meet some of these adaptations. If doing each of those operations costs like $11, then people are not going into it…”
Hence, whichever path you take, it's critical to keep blockchain scalability in mind as you develop your project. With the right planning, you can meet the needs of even the most demanding Web3 users.
How can Zeeve help?
We are an enterprise-grade Blockchain infrastructure automation platform with 30+ supported protocols and integrations. We help DevOps teams to set up a secure and reliable blockchain nodes or consume secure APIs using our deeper understanding of Blockchain protocols and dApps.
Along with saving valuable time and human resources for your team, Zeeve can help you achieve better ROI and TCO using our automated deployment, monitoring, analytics, and integrations.
So, if you struggle to make the right decision or have complex ideas in mind, get in touch with us. And our team can assist you in developing a solution that fits smoothly with your business needs.
Join the growing list of clients that trust us with their Blockchain initiatives. Connect with us here.
Race car driver, Not-there-yet billionaire, Digital marketing strategist for tech startups
2yGreat read! Thanks for sharing such an informative and useful post Ravi Chamria
Great insight! L1 infrastructures that are scalable, GDPR-secured, fully open-source, with worldwide coverage are equally essential building blocks for L2 solutions.