With the rapid growth in the number of blcokchain users, the need for scalability solutions has increased and hence multiple solution providing projects are being developed.
This article will provide an overview on
- Ethereum scaling solutions
- What are Layer 2 projects?
- Why do we need Ethereum Layer 2 solutions
- An overview of different Ethereum L2 projects
- Zero-knowledge rollups
- Optimistic rollups
- State channels
- Side chains
- Hybrid solutions
According to layer 2 ecosystem tracker L2Beat, second-layer scaling solutions to prevent network congestion on Ethereum are growing, with over $1 billion locked up in scaling protocols. With $285.6 million locked up, crypto exchange dYdX is at the top of the list. Scaling solutions allow decentralized apps to avoid network congestion by utilizing several methods. For example, the Ethereum network may achieve 100,000 transactions per second by combining Sharding with rollups and other scaling techniques. In this article, we will get the overview of the Layer 2 solution in Ethereum blockchain.
What is blockchain scalability?
Scalability in simple terms means the capability of a system, network, or process to handle growth. In blockchain, it is the capacity of a network to handle high transactional throughput and future expansion. Many reaserchers fear that the long term, blockchain network scalabiliity may become a challenge and hence looking for different solutions.
Scaling issues arise when the quantity of data traveling via the blockchain reaches a limit due to the network's insufficient capabilities.
Ethereum scaling solutions
In Ethereum blockchain, there are two types of proposed scaling solutions:
This scaling approach implies modifications to the mainnet protocol. Proposed with the phased approach in Ethereum 2.0 chain roadmap.
Ethereum network is close to switching to proof-of-stake consensus method. This new consensus mechanism allows for quicker transaction and more energy efficient. With the genesis of Eth2.0, beacon chain is live with staking on Ethereum.
Sharding is an effective way to scale up database systems and this method can also be applied to blockchain.
It is the technique of horizontally dividing a database to share the load. It reduces network congestion and increases transactions per second by forming additional chains known as
shards. This will also reduce the workload for each validator since they will no longer be required to process the whole of all network transactions. Read "Solutions to Scalability: Sharding Explained" to have a very good understanding of the concept.
These solutions are often deployed independently of the mainnet (Layer 1) and do not necessitate any modifications to the Ethereum protocol. Some layer 2 solutions, like rollups or state channels, draw their security directly from layer 1 Ethereum consensus. Other solutions include creating new chains in various forms that draw their security separately from the Mainnet, such as sidechains or plasma chains. Read Solutions to Scalability: Can Off-Chain Payments Scale Blockchain for an understanding of lightning network and other payment solutions.
- improve base protocols by modifying how they operate in terms of data processing,
- modify the protocol's rules to enhance transaction capacity and speed while supporting more users and data.
- include increasing the quantity of data in each block or speeding the pace at which blocks are verified to enhance total network throughput.
Bitcoin can process 7 transactions per second.
Ethereum: can handle around 30 transactions per second.
Visa using its centralized VisaNet electronic payment network, can handle around 20,000 transactions per second.
According to the cryptocurrency app tracker State of the Dapps, over 2,845 decentralized apps are now operating on the Ethereum blockchain, with many more under development.
Ethereum's potential for increasing the DeFi space suggests the possibility of a significant increase in the number of dapps and users on the Ethereum network. The growing number of Ethereum apps and users is to blame for the network's increased congestion. This lead to the complaint of excessive gas prices and slower transaction on the Ethereum (Layer 1) mainnet.
Why do we need Layer 2 Solutions
Ethereum layer two scaling solutions are essential tools for solving network performance issues. Many Ethereum scaling methods are being researched, tested, and implemented, each with a unique strategy to attaining Scalability.
- Multiple solutions can assist in minimizing overall network congestion while also preventing single points of failure.
- Different solutions can coexist and have an exponential influence on future transaction speed and throughput.
- No one scaling solution that will be sufficient for Scalability.
- For successful implementation of ETH2.0 Vision.
The goal of Scalability solution for the Ethereum network are to enhance transaction speeds and transaction throughputs. It is important that the scaling solutions should not compromise the Ethereum network's security and decentralization.
What is a Layer-2 project?
Layer 2 is a separate network that runs on top of base layer blockchain aka Layer 1 (such as Ethereum). These projects do not require any base-level protocol changes to interface with the main network.
- Lightning Network is a layer 2 Bitcoin solution.
- Goal: It is intended to facilitate rapid, scalable transactions between and among participating nodes, and it has been hailed as a solution to Bitcoin's scalability issue.
- Working: Normally, transactions are carried out on the blockchain; however it moves the transactions off-chain.
- Advantage: It relieves pressure on the Bitcoin network and reduces transaction costs.
- Structure: It is a set of protocols that enable the development of smart contracts and decentralized applications on top of the Ethereum blockchain. Smart contracts and transactions are mostly executed outside of the Ethereum main chain via various means. This is accomplished while retaining the complete network security of the core layer 1 chain.
- Uses: Ethereum layer 2 scaling solutions can be used for various purposes, including off-chain computing and payment scalability. They let developers create apps with faster transaction finality and lower gas costs than they would if they built on the layer 1 chain. However, scalability must be improved for Ethereum to be appropriate for global enterprise and mass adoption.
An overview of different Ethereum L2 projects
They execute transactions outside of the main Ethereum chain, i.e., layer 1 but submit transaction data to it.
- Because transaction data is on layer 1, rollups may be protected via layer 1. The ability to inherit the security characteristics of layer 1 while completing execution outside of layer 1 is an essential feature of rollups.
- Transaction execution outside layer 1
- Data or Proof of Transactions on layer 1
- A Rollup smart contract in layer 1 that can enforce correct transaction execution on layer 2 by utilizing transaction data on layer 1.
- Low transaction fees
- Open participation
- Fast transaction throughput
- Working: They bundle hundreds of off-chain transfers to create a cryptographic proof known as a SNARK, i.e., succinct non-interactive argument of knowledge. This is referred to as validity proof, and it is displayed on layer 1. ZK-rollup smart contract maintains all layer 2 transfers and can only be updated with valid proof. This implies that instead of requiring complete transaction data, they require validity proof. Zero-Knowledge refers to the fact that all verifiers are aware that they have the same information without it being revealed.
- Result: As less data is included, validating a block is faster and less expensive. There are no delays when transferring funds from layer 2 to layer 1 as the funds have already been confirmed by a validity proof approved by the ZK-rollup contract. ZK-rollups on layer 2 can be optimized to minimize transaction size further. For example, an account is represented by an index rather than an address, which lowers a transaction from 32 bytes to 4 bytes. They can create a block in about a minute and process 2,000 TPS.
- Advantages: Finality time is reduced since the state is instantly confirmed once the proofs are transferred to the main chain. The data required to restore the state is kept on the layer 1 chain; it is secure and decentralized.
- Disadvantages: EVM support is required. Validity proofs are computationally intensive and not worth the effort for applications with limited on-chain activity.
- Major Implementations: Loopring, Starkware, Matter Labs zkSync and Aztec 2.0.
- Working: They run parallel to the main Ethereum chain on layer 2. As they don't do any computation by default, they provide high scalability. Transactions are published to the main Ethereum chain as calldata, further optimizing them by lowering the gas cost. They provide 10-100x increases in scalability. With the introduction of shard chains, this number will grow even more.
- Fraud Proofs: As optimistic rollups do not compute the transaction, a method must be in place to guarantee that transactions are genuine and not fraudulent. This is when fraud proofs comes into play. If a fraudulent transaction is detected, the rollup will run a fraud-proof and the transaction's computation using the available state data. As a result, transaction confirmation may take longer than with a ZK-rollup. The gas used to conduct the fraud-proof computation is even refunded.
Image Source: Ethereum
- Advantages: These are EVM and Solidity are compatible. In addition, the layer 1 chain stores all transaction data, making it safe and decentralized.
- Disadvantages: Long wait times for on-chain transactions due to potential fraud issues. They provide less throughput than Plasma and ZK Rollups.
- Major Implementations: Optimism, Fuel Network, Cartesi and OMGX.
This solution utilizes child or subsidiary blockchains to aid the parent chain with verification. It is a distinct blockchain linked to the main Ethereum chain and uses fraud proofs to settle disputes. As they are smaller clones of the Ethereum Mainnet, these networks are referred to as child chains. Merkle trees allow for the development of an infinite stack of these chains that can work together to offload bandwidth from the parent chains. Fraud proofs provide the security of these, and each child chain has its mechanism for block validation.
- Advantages: High throughput, Low Cost per Transaction.
- Disadvantages: Does not allow for general computation. To maintain the security of our funds, we must periodically monitor the network or transfer this obligation to someone else.
- Major Implementations: OMG Network, Polygon, Gluon and Gazelle.
Image Source: EthHub
It is a two-way communication channel that connects a blockchain to off-chain transactional channels. It enables users to conduct numerous off-chain transactions while only submitting two on-chain transactions to the Ethereum network.
- Working: Participants must lock up a portion of Ethereum's state to use a state channel. This is done by putting Ether into a multi-sig contract, which requires multiple signatures from multiple private keys to be executed. This enables the contract's initial transaction to create a channel. As a result, participants can transact off-chain very fast and at a low cost. A single on-chain transaction should be sent to the Ethereum blockchain to unlock the state when the transaction is complete. Any application that uses state channels can off-chain execute a large amount of work, making complicated transactions quicker and cheaper. This is since off-chain computations do not incur the same gas prices as on-chain computations. Instead, a single transaction fee is paid when the final state is provided as a list of transactions, effectively ending the channel.
- Advantages: High Privacy, Instant Finality.
- Disadvantages: Need 100% availability of all the participants involved.
- Major Implementations: Connext, Raiden and Perun.
Image Source: EthHub
These are a cross between layer 1 and layer 2 scaling solutions. It is a separate EVM-compatible blockchain that runs in parallel to Mainnet. It operates according to its own set of consensus rules and block specifications. It is built on the EVM means that it works in the same way as the main Ethereum chain. They are linked via a two-way peg that allows for the unrestricted movement of bitcoin from the main chain to a tier two chain but requires some third-party trust.
- Advantages: Supports General computation and is EVM compatible.
- Disadvantages: Less Decentralization, Layer 1 does not provide security.
- Major Implementations: Skale, POA Network and xDai.
- Liquid Network, linked to Bitcoin's main chain, is one example of a sidechain.
- Goal: It seeks to address scalability issues by offloading part of the validation and transaction processing operations to another blockchain. This frees up the main chain to handle a higher volume of transactions.
Image Source: StackExchange
- It refers to parallel chains.
- Structure: These chains run parallel to one another in a network of interconnected blockchains. They are all built inside the same framework, so they have the same security features linked to the central relay chain. However, all function independently to handle their respective applications.
- Advantage: As the distribution is efficiently dispersed to manage workloads, they provide speedy transactions.
- Example: Polkadot etc.
Image Source: StackExchange
- These systems incorporate the best features of various layer 2 technologies.
- Major Implementations: Arbitrum and Celer.
Image Source: Medium
The crypto sector has experienced massive growth in the number of users on DeFi services and Dapps. Ethereum layer 2 solutions have emerged as solutions to the Ethereum network's Scalability and high transaction costs. Scalability is an essential condition for assuring a blockchain network's widespread adoption. Cheaper transaction costs may encourage more people to adopt the Ethereum network. Layer 2 solutions, which enable off-chain computing, provide the best solution for growing users on the Ethereum network. They have a high potential for positively changing the blockchain ecosystem.
Cover image by Coddy Otto________________________________________________________
Disclaimer: The information contained on this web page is for education purpose only. Readers are suggested to conduct their own research, review, analyze and verify the content before relying on them.
To publish press releases, project updates and guest posts with us, please email at firstname.lastname@example.org.
Subscribe to EtherWorld YouTube channel for easy digestable content.
Support us at Gitcoin
You've something to share with the blockchain community, join us on Discord!