What are Layer 2 Scaling Solutions?

Blockchain’s moon race has begun as the ecosystem tries to develop scalability solutions that meet demand without sacrificing security and decentralization – the classic Blockchain trilemma.

Due to Ethereum’s limited processing speed, which can only process a small number of transactions per second, many dApps are not able to function at all due to the rapid growth in NFTs, decentralized finance, and gaming, adoption has become a bottleneck.

Ethereum’s transition from a proof-of–stake sharded blockchain may ease some of the pressure on layer 1. Sharding splits the Ethereum network into new chains and shards to spread out the load, reduce congestion, and increase transactions per second.

But, full deployment is still many years away, and participation isn’t slowing down anytime soon. This has driven the adoption of layer 2, which runs on top Ethereum’s layer 1, to scalable solutions.

Layer 2 and related technology offer many different options for Ethereum scaling. Each solution has its own benefits and tradeoffs.

  • Plasma
  • Sidechains
  • State Channels and Payment channels
  • Optimistic Rollups
  • ZK-Rollups
  • Validium
  • Aggregators

Plasma

Plasma chains are independent blockchains that anchor to Ethereum. Sometimes called child chains, they function as smaller copies the Ethereum mainnet. These child chains combine smart contracts with cryptographic verification to offload transactions from their parent chain.

Each Plasma chain has its own block validation mechanism. The Plasma chains report back to Ethereum’s main chain periodically. This security is used to settle disputes that are challenged by fraud proofs.

Plasma chains allow for high throughput and low transaction costs. Only basic transactions such as token transfers and swaps will be supported. There is also a requirement for liveliness and chain withdrawals may prove difficult.

Many projects offer Plasma implementations for dApp integration. These include OMG Network and LeapDAO.

Sidechains

Layer 2 sidechains can be independent Ethereum Virtual Machine compatible blockchains that run parallel to the Ethereum mainchain. Sidechain nodes are responsible for verifying and processing transactions, adding block and maintaining the sidechain’s own consensus rules such as proof of authority or delegated proofof-stake to ensure more efficient transactions.

Compatibility can be achieved by a two-way bridge with Ethereum. However, security is not directly inherited. It is the responsibility and responsibility of the sidechain.

Sidechains use established technology, support more complex transactions with EVM compatibility. However, they are less decentralized and rely upon their own consensus mechanisms and security rather than layer 1. Therefore, technically they are not layer 2.

Sidechain implementations are offered by POA Network and xDai chains.

State Channels and Payment channels

State channels are one of the most widely discussed layer 2 scaling solutions. They use multisignature contracts to allow participants to transact quickly, often off-chain, and then settling back to layer 1, if necessary.

State channels can handle more complicated interactions, such as a game. Payment channels, on the other hand, are simpler state channels that deal only with payments between two parties. State channels are ideal for micropayments because they allow for high transaction throughput and low costs. The setup and settlement costs are prohibitive for micropayments. However, they can be used to make one-off payments. Liveliness is essential and funds must be kept in open channels.

Perun, Celer, and Raiden are the main projects that leverage state channels on Ethereum.

Optimistic Rollups

Optimistic rollups are parallel to layer 2 of the Ethereum main chain. These rollups allow transactions to be executed inexpensively and scaleable in batches outside of layer 1. However, they still use the security of Ethereum base layer for submission as a single transaction.

Since computation is slow and costly in the Ethereum network’s Ethereum network, optimistic rollups can offer up to 100x scalability improvements because they don’t run any computation by default. This number will rise with future Ethereum sharding.

Instead, optimistic rollups assume that transactions are valid and can only run computation if challenged by fraud-proof. Optimistic rollups use an optimistic bonding system. Anyone found guilty of a fraudulent transaction will lose their bond and be incentivized to do so.

Because they are compatible with EVM and Solidity, optimist rollups can handle any transaction on Ethereum layer 1. Optimistic rollups are secure and decentralized because all transaction data is stored on layer 1. They also provide execution scaleability. Due to potential fraud issues, it is possible for transactions on-chain to take a long time.

Optimism and Arbitrum are among the many projects that offer implementations. Optimism and Cartesi support simple payments as well as complex smart contracts. Consequently, optimistic rollups are more suitable for DeFi applications.

Uniswap, a leading DEX platform, recently announced that it would launch Optimism in order to reduce transaction costs and provide a glimpse into the future of the industry.

ZK-Rollups

ZK-rollups (zero-knowledge rollups) bundle transactions off-chain to generate a cryptographic evidence, also known as a SNARK. ZK-rollups, in contrast to optimistic rollups perform computation off-chain and submit these valid proofs to layer 1.

ZK-rollup smart contract maintains the state of all transactions at layer 2. Validity proof is required to update this information. Validating blocks is faster and cheaper because ZK-rollups do not need all transaction data.

Furthermore, the ZK-rollup contract already verified the transactions so there is no delay in moving from layer 2 into layer 1.

ZK-proofs have faster finality times and are secure and decentralized. The data required to recover the state are stored on Ethereum layer 1. Some ZK-rollups don’t have EVM support and validity proofs can be very time-consuming to compute. This makes them ineligible for dApps that do not have much on-chain activity.

There are several ZK-rollups, including ZkSync and ZKSwap. ZK-rollup technology is used to make scalable, low-cost Ethereum payments. ZkSync provides a trustless protocol that allows for secure, scalable and reliable transactions on Ethereum. This protocol can be used by crypto wallets as well as defi platforms to access PayPal-like scale. ZKSwap is a ZKrollups-based layer-2 DEX that offers zero gas fees and high transaction throughput. It transforms the future of AMM.

Harmony’s interoperable layer 2, for Ethereum, is something special. It combines the best of both ZK-rollup and optimistic worlds. Harmony offers full EVM compatibility unlike ZK-rollups. It also provides faster settlement and shorter withdrawal times than Optimistic rollsups. The Harmony interoperable layer 2 for Ethereum is gas-efficient because of its sharded Proof-of-Stake Blockchain that bridges to Ethereum through smart contracts.

Harmony is able to provide a more comprehensive solution to projects by combining the best of ZK-rollups and Optimistic rollups. Harmony’s interoperability extends beyond Ethereum, with its Horizen bridge connecting to Binance Smart Chain. This opens up access to the wider defi ecosystem.

Validium

Validium uses ZK-rollups as validity proofs. However, the data is not stored on Ethereum Layer 1. This allows for up to 10,000 transactions per second per Validium Chain. Multiple Validium chains can be run simultaneously.

Validium has no withdrawal delays which improves capital efficiency and makes it less vulnerable to economic attacks by high-value, fraud-proof-based dApps. Validium chains offer limited smart contract support.

Loopring and StarkWare are two examples of projects that provide Validium implementations. ImmutableX is the first layer 2 scaling solution to NFTs on Ethereum. It uses StarkWare’s Validium technology and ZK-rollup technology. This allows transactions speeds of more than 9,000 per sec with no gas fees and preserves Ethereum’s security in its ecosystem of apps, marketplaces, and games.

Aggregators

Polygon acts as an aggregator for these layer 2 solutions and offers multiple implementations of different layer 2 technologies. Polygon is the fastest-growing layer 2, bringing the blockchain infrastructure to the masses. It opens up the accessibility, use and use cases for decentralized applications on Ethereum’s internet of Blockchains.

Polygon’s layer 2 scalability solutions have been adopted by Defi blue chip companies, with platforms such as Aave and SushiSwap already integrating with them.

CVI, the COTI-powered decentralized volatility index, is also integrating with Polygon. CVI users are able to open positions, provide liquidity, and stake while simultaneously processing transactions from the main ETH Blockchain.

Summary

One scaling solution is not sufficient to achieve the secure, decentralized and scalable vision for Ethereum 2.0. This avoids the problems of high fees or bottlenecks.

While Sharding will help with on-chain scaling at layer 1, off-chain layer 2, flexible solutions that can adapt to the specific requirements and acceptable tradeoffs of the plethora dApp projects are crucial to the future development of blockchain.

The ecosystem as a whole can be greater than its parts. Different layer 2 solutions can exist and work in harmony to meet the growing demands of mainstream adoption. This will continue to reduce congestion and prevent single points or failures as we move to Web 3.0.