Cryptocurrencies have evolved rapidly, revealing the need for improved transaction efficiency and accessibility. Layer 2 solutions address this demand by offering enhanced performance compared to the more limited transaction processing capabilities of traditional Layer 1 blockchains like Bitcoin and Ethereum. By utilizing techniques such as batch-processing transactions, Layer 2 solutions balance cost, security, and decentralization, catering to diverse decentralized computation environments and fostering greater innovation in areas such as decentralized autonomous organizations (DAOs).
Since the inception of the Lightning Network on Bitcoin in 2017, numerous Layer 2 solutions have been proposed and implemented, with rollups emerging as a prominent choice for Ethereum. These solutions promise to unlock the untapped potential of Layer 2 technologies while ensuring their secure and efficient integration with existing blockchain networks. However, challenges still persist in areas like centralization of operator control and implementation security – areas that need further attention to fully leverage the benefits of Layer 2 solutions in the rapidly evolving cryptocurrency landscape.
Types of Layer 2 Solutions
State Channels
State channels are an early approach to scaling blockchain transactions by moving them off the main chain. This enables faster transaction processing and reduces costs.
State channels work by locking a portion of the blockchain state between participants. They then transact off-chain and finally submit the updated state back on-chain. This method minimizes computation and storage on the main chain, reducing associated gas fees.
Pros & Cons
State channels offer fast, scalable transactions with some privacy benefits. However, they don't support open participation, can be capital inefficient, and require constant monitoring of the main chain for potential disputes.
Use Case
The Lightning Network, built on top of Bitcoin, is a popular example of state channels in action. It forms a network of bidirectional payment channels where nodes connect multiple payment channels and assist in routing payments across them. Nodes charge routing fees but aren't trusted, and payment is enforced with atomicity via time-locks.
Plasma
Plasma is another scaling solution designed to improve transaction throughput by creating child chains branching from the main chain. These child chains, called "plasma chains," handle a subset of the network's transactions while periodically committing updated states to the main chain.
This hierarchical structure enables increased transaction processing speed and lower gas fees. The security of transactions on the plasma chains is maintained by the parent chain's smart contracts, allowing users to safely interact with child chains without compromising their assets on the main chain.
Use Case
One example of plasma implementation is the OmiseGO (OMG network), which uses a plasma framework called More Viable Plasma (MoreVP) for decentralized exchange trading and payment processing.
Rollups
Rollups are another Layer 2 scaling solution that works by aggregating multiple transactions into a single proof, known as a "rollup," which is then submitted to the main chain. This approach increases transaction throughput and reduces the storage and computation requirements on the main chain.
There are two main types of rollups: optimistic rollups and zero-knowledge (zk) rollups.
Optimistic Rollups
Optimistic rollups rely on game-theoretical assumptions and require an on-chain dispute resolution system to ensure correctness. Transactions are executed off-chain, and the resulting state is rolled up and submitted on-chain. Fraud proofs are used to challenge incorrect state submissions when detected.
The Arbitrum network is an example of an optimistic rollup system, enabling Ethereum contracts to run with increased transaction throughput and lower gas fees.
ZK-Rollups
Zero-knowledge rollups (zk-rollups) use zero-knowledge proofs (zk-SNARKs or zk-STARKs) to generate a cryptographic proof that verifies the validity of a batch of transactions. Transactions are executed off-chain, but their resulting state is encrypted, rolled up, and submitted on-chain in a non-interactive manner.
Loopring is an example of a zk-rollup system focusing on decentralized trading and payment processing with increased speed and lower costs.
In summary, Layer 2 solutions, including state channels, plasma, and rollups, aim to improve transaction throughput, speed, and efficiency on blockchains. These solutions operate on top of the main blockchain network and mitigate many of the existing bottlenecks in transaction processing.
Evaluating L2s
Blockchain Trilemma
The Blockchain Trilemma involves finding a balance between scalability, security, and decentralization in blockchain technology. Scalability refers to the blockchain's transaction processing capability, decentralization deals with the number of parties involved in a blockchain's consensus, and security is about the effort needed to attack a blockchain, such as controlling nodes. L2s don't resolve this issue completely, but they offer a wider range of options along the trilemma spectrum, from L1s (least scalable but highly secure and decentralized), through rollups (with varying degrees of decentralization and security), to state channels (highly scalable but potentially vulnerable).
A Framework for Evaluation
A useful framework for evaluating L2 projects should cover three key aspects: Security, Performance/Usability, and Other Aspects.
Security
- Liveness: It's important to know if users or trusted watchtowers must monitor a scaling solution's on-chain activity.
- Custodial: Can a fraction of L2 validators commit fraud or hinder users from accessing funds?
Performance/Usability
- Max throughput: Consider the stressed-tested transaction capability of each solution.
- Cost of transaction: Take into account the actual transaction cost data from projects.
- Capital efficiency: Determine if the L2 project requires locking a substantial amount of capital.
- Withdrawal time: How long it takes for withdrawals to L1 to complete.
- Subjective finality: The speed at which transactions reach an irreversible state on L1.
Other Aspects
- EVM code portability: Check if Solidity code can be directly deployed on the L2.
- Native Privacy Options: Assess if the project offers privacy protection by default.
Keep in mind that this framework serves as a guide, not definitive judgments on L2 projects. It's crucial to consider specific project details and monitor updates and activities while continuously evaluating the progress towards decentralization and safety in projects.
Current State of Layer 2 Solutions
Ethereum's network congestion and high gas fees have paved the way for Layer 2 solutions such as rollups and sidechains. Among these, Lightning Network and Polygon boast the lowest transaction fees, with Polygon processing most transactions at the highest transactions per second (TPS). However, in terms of total value locked (TVL), Arbitrum stands at the top, while StarkEx has the highest valuation, reflecting investors' high expectations for rollups.
Although L2 solutions showcase a higher achievable TPS compared to their current average, rollups remain underutilized. For instance, data from 2022 shows that while Ethereum hosted around 1.2 million transactions per day, Polygon had an average of 3 million, and Optimism only 100,000, amounting to less than 10% of Ethereum's daily volume. Furthermore, in terms of unique addresses and daily active users, Polygon comes closest to Ethereum's figures: 170 million unique addresses with 300,000 active daily users, as opposed to Ethereum's 200 million and 500,000, respectively.
The Ethereum 2.0 rollout focuses on scaling user activity at Layer 2 while optimizing Layer 1 as a secure, decentralized settlement layer for rollup data storage. This approach aims to make rollup transactions significantly cheaper. For example, EIP-4844 (Proto-Danksharding) reduces data availability costs for rollups. Consequently, Ethereum 2.0 should benefit the development of rollups, increasing accessibility and attracting more users to Layer 2 blockchains.
The Layer 2 solutions landscape is dynamic, with projects like Lightning Network, Polygon, Arbitrum, and StarkEx showcasing promising results in terms of transaction fees, TVL, and TPS. As Ethereum 2.0 and Layer 1 optimizations progress, it is expected that Layer 2 protocols will increasingly gain traction and benefit decentralized applications (dApps), eventually addressing network congestion and high fee-related issues.
Looking Ahead
As we've discussed earlier in this article, state channels, plasma, and rollups are promising Layer 2 solutions for blockchain networks like Ethereum. These technologies have the potential to significantly enhance transaction speeds and efficiency, thereby paving the way for broader adoption of blockchain applications.
To assess the effectiveness and potential of these Layer 2 solutions, it's crucial to be mindful of centralized points of failure and vulnerabilities that may arise during the deployment and upgrades of a project. Projects must continuously strive to enhance their technical designs and address these concerns to assure long-term viability.
Presently, Layer 2 technologies are still underutilized, but with the support of Eth2.0, Layer 2 solutions are poised to unlock new possibilities for various blockchain applications, from decentralized finance to supply chain management.