Ethereum Layer 2 Scaling Technologies Explained

Layer 2 scaling technology is essential due to several limitations inherent to Layer 1 networks such as Ethereum. Understanding why we need Layer 2 scaling solutions requires close examination of the underlying challenges they are designed to address.

One of the primary issues with Ethereum is its limited transaction throughput of only around 15-30 transactions per second (TPS). This limitation arises from the block size and block time, which are designed to maintain network security and decentralization but at the cost of speed.

When the upper limits of the capabilities of a Layer 1 blockchain are being tested and traffic is saturated, users must pay higher gas fees (transaction fees). This can make using Ethereum and other EVM blockchains prohibitively expensive, especially for smaller transactions, defeating the purpose of a decentralized economy by effectively limiting access to the network during times of congestion to only those who can afford to use it.

Network congestion not only increases transaction costs, but also leads to slower processing times and queuing up of user transactions. This can present as a terrible user experience, at best, and disastrous financial ruin in the worst case scenarios. For example, when transactions get ‘stuck’ due to temporarily rising gas costs users will often attempt to retry them, leading to duplication and possible unintended consequences. Sadly, even in 2023, learning how to cancel or override transactions based on their nonce is still a prerequisite for users to be able to utilize blockchain safely and effectively. Compounded by the difficulty managing long and cryptic account numbers and seed phrases, poor UX hinders the use of dApps and blockchain technology in general, preventing mainstream adoption.

Fortunately, Layer 2-based solutions are coming to the rescue.

Initially, the vision for scaling Ethereum had a heavy focus and reliance on sharding, a process that splits the network into several smaller portions (shards) to spread the load. However, after the development and rising popularity of rollups, with user adoption plotting a course somewhat akin to a hockey stick, the Ethereum community and its developers have adapted their strategy towards favoring Layer 2 Rollups with sharded Data Availability.

What types of Layer 2 solutions are available for Ethereum?

Ethereum's Layer 2 scaling solutions encompass a diverse range of technologies, each designed to enhance transaction speed, reduce costs, and improve the network's overall efficiency. These include:

State Channels, like Raiden and Celer Network, facilitate direct off-chain transactions between participants, with the final state later recorded on the Ethereum blockchain. They are ideal for applications needing high-speed, bi-directional transactions, such as gaming or streaming services, offering instant transactions and enhanced privacy at reduced costs. However, they require users to lock up funds and work best for repeated interactions between the same parties.

Sidechains, including Gnosis chain and Polygon PoS Network, are not truly Layer 2 scaling solutions, but independent blockchains running in parallel to Ethereum, connected through two-way bridges. They offer a customizable environment for dApps, providing flexibility with faster and cheaper transactions. The trade-off is that their security relies on their own, potentially less robust, consensus mechanisms because they do not post state changes and transaction data back to Ethereum Mainnet.

Plasma, exemplified by platforms like OMG and Loom, create smaller child blockchains linked to the main Ethereum chain, based on Merkle trees. These child chains handle numerous transactions with EVM-equivalence, with only the final blocks and state data recorded on the main chain. This approach is versatile, catering to a broad spectrum of applications from DeFi to gaming, significantly enhancing throughput and reducing main chain congestion. Yet, Plasma can face challenges with complex exit procedures and long withdrawal times of 7-14 days, as well as data availability.

Rollups come in two varieties: Optimistic Rollups, like Optimism and Arbitrum, assume transactions are valid by default, verifying them on-chain only if challenged, and ZK Rollups (Zero-Knowledge Rollups), such as Astar zkEVM and zkSync, which bundle transactions and use zero-knowledge proofs for verification. Both kinds of rollups are well-suited for DeFi and NFT marketplaces, offering reduced fees and increased throughput. Optimistic Rollups, however, are affected by delayed withdrawals due to a fraud challenge period, while ZK Rollup platforms typically face limitations in smart contract compatibility due to their complex cryptographic computations and lack of EVM-equivalency*.

Lastly, Validium, the newest Layer 2 scaling solution, such as StarkWare’s StarkEx or Polygon’s Avail, is similar to ZK rollups but stores transaction data off-chain, further boosting scalability. Being ideal for high-capacity applications such as exchanges and gaming, it offers tremendous throughput and low costs. The primary concern with Validium though is the off-chain data storage, which carries with it certain centralization, censorship, and security-related implications.

Each type of Layer 2 solution addresses Ethereum's scalability challenges in unique ways, balancing trade-offs between security, decentralization, and throughput. Their applicability largely depends on the specific needs and nature of the application they are intended to support, but generally, Layer 2 scaling is trending towards use of ZK and Optimistic Rollups as popular favorites, and many players well-known in the web3 industry have announced plans to roll with their own solutions moving in that direction.

How do ZK Rollups compare to Optimistic Rollups and now, Valadium?

ZK Rollups, Optimistic Rollups, and Validium are all Layer 2 scaling solutions, but they differ in their approaches to handling transactions, data availability, and security. Understanding these differences is key to determining which solution might be better for any specific use case. Let's compare them:

How do ZK Rollups work?

ZK Rollups are a type of Layer 2 solution that help reduce the load on the main Ethereum blockchain by processing transactions off-chain. The "ZK" in ZK Rollup stands for Zero-Knowledge Proofs, a cryptographic method that allows one party to prove to another party that a statement is true, without revealing any information about the statement itself. This is key to maintaining security and privacy.

ZK Rollups work by grouping (or "rolling up") multiple transactions into a single transaction. These grouped transactions are then processed off-chain. Once the transactions are processed, the rollup generates a cryptographic proof, known as a SNARK (Succinct Non-Interactive Argument of Knowledge), and submits it to the main blockchain. This proof confirms that the batch of transactions has been correctly processed.

In ZK Rollups, all transaction data is stored on the main blockchain (Layer 1). This ensures high data availability, meaning users can always access their funds and data even if the Layer 2 network experiences issues. By doing this, ZK Rollups significantly reduce transaction fees and increase the throughput of the underlying network by offloading computational workload from the main chain. They also provide a high level of security and data availability, both of which are guaranteed by Layer 1.

While ZK Rollups offer improved throughput compared to Layer 1, the need to store all data on-chain can limit scalability to an extent and might increase costs compared to other Layer 2 solutions that don't store all data on-chain.

How do Optimistic Rollups work?

Transactions are executed and recorded on a separate Layer 2 chain, but unlike ZK Rollups, they don't use zero-knowledge proofs for instant validation. Transaction data is also posted on-chain, similar to ZK Rollups, but it is assumed that transactions are valid by default and computation is only run on-chain in case of a dispute (hence finality is "optimistic"). This requires a "fraud proof" mechanism and a challenge period for disputes, but offers increased scalability at a cost of having generally slower finality times than ZK Rollups, due to the challenge period.

How does Validium work?

Unlike ZK and Optimistic Rollups, where transaction data is stored on the main blockchain, Validium stores this data off-chain. This significantly reduces the storage load on the main blockchain, allowing for higher scalability.

Validium typically relies on a set of trusted third parties or committees to store the off-chain data. These committees are responsible for maintaining data integrity and availability.

While Validium inherits the security guarantees of zero-knowledge proofs for transaction validity, data availability committees introduce additional counterparty risks. Users must trust these entities to maintain and provide access to the off-chain data. By trading off a degree of security for storage efficiency, however, and offloading data from the main blockchain, Validium can process a higher number of transactions per second at a lower cost compared to solutions such as Optimistic or ZK Rollups that store all their data on-chain.

Conclusion

In conclusion, ZK rollups offer a balance of security, decentralization, and scalability, while optimistic rollups prioritize simplicity and compatibility with Ethereum's execution model, though compromising on time to finality and therefore some capital efficiency.

Validium, on the other hand, maximizes scalability and efficiency but also requires trust in off-chain data management.

As blockchain technology evolves, these solutions may also adapt, offering more nuanced and optimized approaches to Layer 2 scaling.

Learn more about Layer 2 scaling solutions:

https://astar.network/blog/introduction-to-zero-knowledge-proofs-39331

https://astar.network/blog/all-you-need-to-know-about-optimistic-and-zk-rollups-39524

Start building on Astar zkEVM:

https://docs.astar.network/docs/build/zkEVM


About Astar Network

Astar Network is the gateway for projects across enterprises, entertainment & gaming in Japan and beyond, driving global adoption and delivering web3 to billions. It leverages a cross-virtual machine powered by Polygon and Polkadot to offer customizable blockchain solutions that accelerate web3 adoption. With zk-powered Ethereum L2 Scaling (zkEVM), EVM, Wasm, and a cutting-edge ecosystem, Astar delivers robust, secure, and interoperable web3 technology. Astar zkEVM is the new Layer-2 solution to scale a web3 experience on Ethereum with zero knowledge (ZK) technology. Astar Network adds an EVM equivalent environment that is seamlessly compatible with existing smart contracts, developer tools, and wallets on Ethereum.

Website | Twitter | Discord | Telegram | GitHub | Reddit | YouTube

*Astar zkEVM is fully EVM-equivalent due to advances in zk prover technology made by Hermes, now a part of the Polygon tech stack and CDK.

0
Megan SkyePost author

Marketing and Technical Content at Astar Network.

Astar Network provides the infrastructure for building dApps with EVM and WASM smart contracts offering developers true interoperability with cross-consensus messaging (XCM) and a cross-virtual machine (XVM). Astar’s unique Build2Earn model empowers developers to get paid through a dApp staking mechanism for the code they write and dApps they build.

0 comments

Astar Network provides the infrastructure for building dApps with EVM and WASM smart contracts offering developers... Show More