Ethereum emphasizes two things: decentralization and security, which makes it slow to process transactions. This in turn affects its network throughput and the scalability of decentralized applications (dApps).
People have come up with many different designs to solve the scalability problem of Ethereum, each with different advantages. This guide will introduce Ethereum scaling solutions and explain how they work and why they are important.
What is scalability?
Scalability refers to the ability of a system to handle exponentially increasing usage without sacrificing functionality. In blockchain technology, scalability refers to the ability of a blockchain to support increased transaction volumes without compromising functionality.
Currently, Ethereum’s ability to process transactions is limited to 7-15 transactions per second (TPS). In contrast, traditional centralized databases such as Oracle Database and Microsoft SQL server can process thousands of transactions per second.
Two Ways Ethereum Design Impacts Scalability
Ethereum has low throughput and slow processing because it prioritizes decentralization and security over scalability (the scalability trilemma).
Here are some aspects of Ethereum’s design that affect scalability:
- Ethereum’s consensus algorithm processes transactions sequentially
Ethereum uses Proof of Work (PoW), which means that transactions on the network must be accepted and verified by all nodes. This encourages decentralization and also guarantees security.
The downside is that executing transactions in order affects the finality of the transaction (the time it takes to confirm the transaction). This further results in Ethereum being unable to support high TPS rates.
- Ethereum limits block size to 1MB
Ethereum limits the amount of data (1MB) a block can hold because limiting the block size improves decentralization by making nodes more efficient at storing blockchain history. Larger block sizes can make it difficult for people to run full nodes, thereby hurting decentralization.
However, the 1MB block size limit reduces the transaction data that miners can put into a block, affecting network throughput. Smaller block sizes also affect the cost of gas, which is the computational resources required to perform operations in the Ethereum Virtual Machine.
Because miners have limited computing power, they are often forced to prioritize transactions with higher fees. This created a bidding war among Ethereum users and forced a massive increase in transaction fees.
What is an Ethereum scaling solution?
Ethereum Scaling Solutions is a platform specifically designed to improve transaction execution on the Ethereum network. Ethereum’s scaling solutions, such as second-layer rollups and sidechains, are protocols that use different mechanisms to increase network throughput.
Tier 1 vs Tier 2 scaling solutions
Scaling solutions can be roughly divided into two categories, “on-chain” and “off-chain”, which are actually differentiated based on their point of execution.
Tier 1 Scaling Solutions
The first layer of scaling consists of changing the blockchain network and rewriting the base layer. “On-chain,” literally means that scalable upgrades to Ethereum are performed on the blockchain itself.
The first layer can be scaled by increasing the block size
A potential first layer scaling improvement is to increase the block size. If Ethereum’s 1MB block size becomes larger, miners will have more room to include more transaction data in blocks.
While increasing the block size of Ethereum results in an increase in the TPS rate, the side effect is that it will slowly move towards centralization, because as the block size increases, so does the size of the blockchain — which makes running Full nodes become difficult (unless you have a supercomputer). For this reason, the Ethereum community has ruled out scaling by changing the block size.
Layer 1 scaling by using blockchain sharding to process transactions in parallel
Blockchain sharding is an improvement to scalability that introduces parallel execution of transactions, replacing the default sequential execution model used by Ethereum. In sharding, the blockchain is divided into smaller chains (shards) that validate and process independent transactions.
Consider how Ethereum currently works:
Transactions are broadcast to the entire network until they can be verified. Sharding does not require all nodes to approve transactions. Instead, each shard has validators (called collators) that approve transactions.
Each sequence (the set of transactions on the shard chain) must be signed by two-thirds of the collators. Furthermore, the proposed sequence must be added to the main chain before the final result can be achieved. These measures help ensure the security of the system.
Through sharding, Ethereum can increase TPS without sacrificing decentralization or security. As the shard chains process different transactions simultaneously, the overall processing power of the network increases. Additionally, network participants can still prove the validity of the sequence of shards through cryptographic proofs.
Layer 2 scaling solutions
They are called Layer 2 (L2) extensions because they are performed off the main chain (Layer 1). Layer 2 scaling, also known as “off-chain” solutions, processes transactions on a separate network but relies on the security of the main chain.
L2 solutions are often designed with an emphasis on transaction speed and scalability – less focus on decentralization and security here. Because they publish transaction data to the Ethereum mainnet layer, L2 can benefit from the decentralization and security of the mainnet. Also, since L2 solutions are built on Ethereum, they do not require their own native tokens.
These off-chain protocols can consolidate multiple transactions into a single transaction and add it to the main chain. This reduces stress on the network and increases the scalability potential of dApps.
Tier 2 scaling solutions include:
- State channel
Second layer vs sidechains
A sidechain is an independent blockchain that interacts with the Ethereum mainnet but is not reliant on its security. Sidechains are connected to Ethereum through a cross-chain bridge, allowing assets to be transferred between the two chains.
Sidechains are good for scalability because they are designed with different sets of qualities to support high throughput. For example, the Polygon sidechain uses a Proof of Stake (PoS) consensus algorithm to enable faster transactions.
The main difference between second-layer solutions and sidechains is their security guarantees. L2 networks enjoy the security guarantees of Ethereum, but sidechains do not.
Sidechains are secured by their own consensus mechanism, while L2 benefits from Ethereum’s consensus. This is why many believe that L2 is more secure than sidechains.
Why are scalability solutions necessary for Ethereum?
A good Ethereum scaling solution helps provide web3 developers and users with lower gas fees and faster transactions, while also keeping transactions secure.
Here’s why scalability solutions are necessary for Ethereum:
- Reduce transaction fees
Ethereum gas fees have become a notoriously troublesome. Scaling reduces network congestion and leads to a significant drop in transaction costs.
Lower gas fees mean better user experience and higher dapp usage. Users will not have to deal with failed transactions or pay exorbitant gas fees.
- faster transactions
Many scalability solutions were created specifically to improve Ethereum’s ability to process more transactions in less time.
For example, Rollup can batch thousands of off-chain transactions to a single on-chain transaction.
The net result of these improvements is an increase in the transaction per second (TPS) rate. While estimates vary, many expect L2 and sharding to push Ethereum’s TPS into the thousands.
- improved security
L2 is great for scaling Ethereum without compromising network security. Unlike on-chain scaling, off-chain scaling projects do not affect the decentralization of Ethereum.
Although these L2s are separate chains, their security is tightly tied to the Ethereum blockchain. This means that users can safely interact with these projects and enjoy the benefits of scalability without worrying about asset safety.
The Five Most Popular Ethereum Scaling Solutions
The five most popular Ethereum scaling solutions are: Rollup, sidechains, state channels, plasma, and Validium.
Rollup combines or “rolls” multiple transactions executed off-chain into a batch and transmits it to the main chain. A single Rollup can contain hundreds (if not thousands) of transactions, which are compressed to reduce the amount of transactions the main chain has to process.
In addition to improving scalability, Rollup provides a level of security similar to Ethereum itself, because transactions in Rollup are anchored to the L1 chain, which guarantees the completion of transactions.
There are two main types of Rollups: Optimistic Rollups and ZK-Rollups, which are differentiated based on how transactions are calculated and published to Ethereum.
ZK-Rollup performs off-chain computation and generates a cryptographic proof called Succinct Non-Interactive Argument of Knowledge (SNARK) or Succinct Transparent Argument of Knowledge (STARK). These “validity proofs” guarantee the validity of batch transactions of nodes on the main chain.
Optimistic Rollup assumes that transactions are valid by default and does not generate valid proofs for each transaction package. However, the validity of transactions in Optimistic Rollup may be questioned by fraud proofs.
ZK-Rollups are more secure because they generate proofs of validity, however, this makes them slower than Optimistic Rollups.
ZK-Rollups are complex mechanisms, so it is difficult to program EVM compatibility into them. Therefore, ZK-Rollup has limited functionality compared to Optimistic Rollup.
Polygon is working on a zero-knowledge EVM (zkEVM) to add zero-knowledge aggregation to the Ethereum network, with plans for Hermez 2.0.
Ethereum L2 with Optimistic Rollup:
- Boba Network
- Immutable X
Ethereum L2 using ZK-Rollup:
As a developer, we can integrate Rollup into dApps to improve transaction finality and scalability. In this way, our users don’t have to pay high gas fees, experience interrupted transactions, and slow processing speeds – all of which are common in Ethereum.
- side chain
A sidechain is a layer 2 solution that is an independent blockchain that runs in parallel with the Ethereum mainnet. The differences between them can be cryptoeconomic incentives, consensus mechanisms, etc.
Sidechains designed specifically for Ethereum have Ethereum Virtual Machine (EVM) compatibility and can support smart contracts. This means we can deploy projects on sidechains and leverage them to improve the scalability of dapps.
Cross-chain bridges are necessary to connect sidechains to the Ethereum smart contract platform. As the name suggests, a blockchain bridge provides a gateway for users to move assets between the main chain and side chains.
To use a bridge, some assets must be locked on the original chain. After that, an equal amount of assets will be generated on the sidechain and deposited into our wallet.
We can freely trade on the sidechain, taking advantage of its superior transaction processing capabilities. As mentioned earlier, sidechains are designed to provide scalability and use different mechanisms to achieve this.
Other alternative Layer 1 (L1) blockchains can also serve as Ethereum sidechains, especially EVM-compatible blockchains. These L1s typically offer lower gas fees, better transaction finality, and in some specific cases richer functionality.
EVM compatible L1:
- Binance Smart Chain
- State channel extension solution
State channels are off-chain scaling solutions that allow both parties to conduct transactions without requiring the main chain to verify each transaction. A state channel is essentially a multi-signature smart contract that executes only with the consent of all parties that need it.
How do state channels work?
- Alice and Bob have a State channel and Bob sells her coffee every morning. Let’s assume she deposits 0.4 ETH in the channel and the transaction is published on mainnet.
- After starting the transaction, Alice and Bob can execute the transaction off-chain for as long as they wish. The only caveat is that both parties must sign the transaction, which means Alice and Bob must approve every coffee payment.
- If Alice runs out of her deposits, she can issue an exit transaction on the main chain. The transaction will be the last known state of the channel, which is then recorded to determine if it ends. Alice and Bob may have made more than a dozen transactions, but the Ethereum network has only recorded two transactions – entry and exit.
State channels allow parties to conduct secure off-chain transactions without experiencing long wait times and high transaction fees. It also improves scalability as miners need to process fewer transactions and work faster.
Ethereum scaling solution using State channels:
- Raiden Network
- Connext Network
- Celer Network
- Plasma chain
Plasma’s white paper introduces the concept of “subchains”, which originate from the main blockchain or “root chain”. While Plasma chains can verify transactions, they rely on the security of the root chain. To prove the validity of the transaction, the child chain submits a cryptographic proof to the root chain.
Plasma chains are similar to sidechains in that they are connected to the Ethereum blockchain through smart contracts. Using the Plasma chain requires locking ETH in a smart contract on the root chain before acquiring tokens on the child chain.
Plasma is considered an L2 scaling solution because it derives its security directly from Ethereum’s base layer. This is why they are more secure than sidechains.
Plasma publishes Merkle roots for every block on the Ethereum main chain. A block root is a small block of information that we can use to verify transaction information. If an attack occurs on the Plasma chain, users can safely exit the main chain and withdraw their funds using proofs.
Ethereum scaling solution using Plasma:
- OMG Plasma
- Gluon Network
Validium is similar to ZK-Rollup, performing computation outside the main Ethereum layer, the main difference between them is that Validium uses “off-chain data availability” instead of publishing compressed data on the main chain like ZK-Rollup.
Validium stores data off-chain through data providers, making them somewhat custodial. However, some solutions like StarkWare use a Data Availability committee (dac) to ensure that data providers behave honestly.
Validium has low fees and fast transaction speeds (up to 100,000 tps). However, they are more credible than other scaling solutions such as ZK-Rollup.
Ethereum scaling solution using Validium:
- Immutable X
What are the disadvantages of scalability solutions?
Two disadvantages of Ethereum scaling solutions:
Many scalable solutions are complex to implement, which can affect their functionality. For example, the Ethereum development team has been pushing back the release date of shards because the upgrade requires a lot of work.
- lower security
While many L2 and L1 scaling solutions rely on Ethereum for security, they are not as secure as the former. Every scalable solution trades some elements like decentralization and security for speed. Users must be fully aware of these risks before using these platforms.
The scalability projects covered in this guide may play an important role in Ethereum’s journey towards scalability. Whether that’s enough to warrant long-term scale remains to be seen, though.
Posted by:CoinYuppie，Reprinted with attribution to:https://coinyuppie.com/full-analysis-ethereum-layer-1-and-layer-2-expansion-solutions/
Coinyuppie is an open information publishing platform, all information provided is not related to the views and positions of coinyuppie, and does not constitute any investment and financial advice. Users are expected to carefully screen and prevent risks.