How Layer 2 Solutions Solve The Main Blockchain Problem

Why layer 2 solutions are crucial for blockchain progress

Antons Tesluks
5 min readMar 29, 2022
Source

According to statistics, about 90% of U.S. and European banks had started exploring blockchain’s potential by 2018. While blockchain might not be the most ‘Googled’ word of 2021, it still captured a vast audience with its state-of-the-art technology. A blockchain is a distributed database of records called blocks that record transactions across many computers. Popular examples of a blockchain includes Bitcoin, Ethereum, Solana, Avalanche, and Polygon.

Although blockchains can perform transactions, main networks are expensive and slow as they cannot handle many transactions. Bitcoin can take only 3–7 transactions per second (TPS), while Ethereum stands at 7–11 TPS. On the contrary, Visa can process about 20,000 TPS which narrows down to using alternate solutions for allowing a higher number of transactions per second and faster processing times.

Key Takeaways

  1. Layer 2 scaling solution enables high throughput while maintaining the security of the underlying blockchain.
  2. Rollups are Layer 2 scaling solutions that perform transaction operations off the main Ethereum blockchain.
  3. State channels possess highly robust privacy properties and hence get the name of Layer 2 constructions.
  4. Sidechains are smaller blockchains that work separately and cannot operate without a parent chain (or mainchain).
  5. Parachains are project-specific blockchains that can be customized for use cases and fed into the leading blockchain.

What are Layer 2 Solutions?

While we discussed how main networks could not process a higher number of transactions per second, Layer 2 solutions help speed up the process and make blockchain systems accessible to everyone.

Layer 2 scaling solution enables high throughput (thousands of transactions per second) while maintaining the security of the underlying blockchain. Let’s learn about different types of Layer 2 solutions existing in the cryptic space.

Different Types of Layer 2 Solutions

We will focus on two primary Layer 2 solutions: Optimistic rollups and Zero-knowledge rollups. The section will also cover channels, Plasma, and rollups.

Rollups

The Layer 2 scaling solutions perform transaction operations off the main Ethereum blockchain but posting the transaction data onto Layer 1 are called rollups. The rollups help execute transactions outside Layer 1, significantly reducing gas fees. Alongside, they help to increase transaction throughput and active participation. There are two different types of rollups based on various security measures.

Zero-knowledge rollups

Zero-knowledge rollups (ZK-rollups) help process thousands of transactions per second on the Ethereum network. It performs this by combining both on and off-chain processes to validate transactions much faster and helps reduce gas fees. It uses Merkle Trees to validate transactions more quickly and efficiently than L1 blockchains. Merkle Trees enable blockchains to be secure from fake on-chain record data.

Pros:

  • Near-instant transfers
  • Secure and decentralized.
  • ZK Rollups are not vulnerable to attacks.

Cons:

  • A user can influence transaction ordering
  • Some zk rollups do not offer Ethereum Virtual Machine support
  • It is challenging to compute validity proofs for smaller applications

Examples: Immutable X, Starkware, Loopring, and Polygon Hermez.

Optimistic Rollups

Optimistic rollups are Layer 2 solutions that run on top of Ethereum’s underlying layer and don’t perform any mathematical computation. They function in a way that after completion of a transaction, optimistic rollups submit a new state to the Ethereum Mainnet. The rollups are written in the Ethereum blockchain that helps to optimize the transaction and reduce costs.

Compared to zero-knowledge rollups, which use validity proofs, optimistic rollups rely on fraud proofs. In short, the aggregators publish minimal information on the Layer 1 platform and assume that the provided data is correct. However, if someone notices a fraudulent transaction, the optimistic rollup will perform a fraud-proof and run the transaction’s computation.

Pros:

  • Increased throughput & security
  • Low gas fees
  • Smart contract capability

Cons:

  • Long withdrawal time
  • An operator can influence transaction ordering

Examples: Arbitrum, Boba, Fuel Network, and Cartesi.

State channels

State channels possess highly robust privacy properties and hence get the name of Layer 2 constructions. The channels do not grant any update unless it is digitally approved and signed by all network users. It ensures security as only the opening and closing transactions are available to everyone.

The channels are capable of smooth two-way communication between the underlying blockchain and off-chain transactional channels. State channels enhance overall transaction capacity and speed and do not need validation from L1 nodes — instead, they use a multi-signature or smart contract mechanism.

Plasma

Plasma is a Layer 2 framework used to create scalable apps based on a convergence of smart contracts and cryptographic verification. Joseph Poon and Vitalik Buterin are the proposers of Plasma who transferred transactions from the main blockchain to a side chain for fast and relatively inexpensive transactions. The sidechains are responsible for sending reports back to the main chain and interacting with it to deal with emerging disputes.

What is a Sidechain?

As the name suggests, sidechains are smaller blockchains that work separately. However, they cannot operate without a parent chain (or mainchain). They work alongside the mainchain to increase efficiency, add functionality, and act as a permanent solution to blockchain scalability. They have their validators (or miners) and even their consensus mechanism (proof-of-stake (PoS) or proof-of-work (PoW)). It adds to the complexity as they can be difficult to change once established.

On a positive note, the separate infrastructure provides security to the mainchain as the sidechains are more centralized than the mainchains. However, trading a little protection for extra speed can be okay if it is separate from the main blockchain. Additionally, the information outsourced to the sidechain can be selected to maintain blockchain security, with the most sensitive information remaining on the mainchain.

Example: Bitcoin 2.0 Release and The Rootstock (RSK) Sidechain

What is a Parachain?

Polkadot and Kusama networks consider Parachain as the heart of the networks. These project-specific blockchains can be customized for use cases and feed into the leading blockchain (Relay Chain). The main blockchain takes responsibility for the consensus, network’s shared security, and transaction settlements.

Parachain favors its users by reducing costs and optimizing transactions. Unlike primary blockchains (like Ethereum), the developers on Polkadot and Kusama can create their independent blockchains. It means that individual parachain can have their parameters such as transaction fees, block times, governance mechanisms, and mining rewards.

The security is enhanced in Parachains as they do not have to rely on validator nodes. They are maintained by collator nodes that store a complete history for each parachain. The parachain then aggregates transaction data into blocks for adding to the Relay Chain. Projects must participate in a parachain auction to become a parachain on Polkadot and Kusama.

Example: Polkadot and Kusama

Final Thoughts

The above article underlined how crucial Layer 2 solutions are for people. As we race towards the era of blockchain adoption, it will become more expensive to utilize a particular network. Layer 2 solutions come to the rescue as they help maintain the initial aspects of a blockchain (such as security, transparency, automation, etc.) while giving a solution that addresses their limitations.

--

--