Ethereum has become a victim of its own success. It worked fine for years when a relatively small number of crypto enthusiasts were interacting with the blockchain. But the DeFi and NFT boom over the last year has grabbed the attention of the masses, with millions of users and developers entering the space to take advantage of new opportunities.
Demand for Ethereum shot through the roof, but the network was clearly unable to handle the influx of new users. The countless transactions and other interactions on Ethereum-based DeFi apps, NFT platforms, and games are clocking up the chain. Network congestion and astronomically high fees have become a serious issue for users and developers.
So much so that developers have been looking for alternatives to move their projects away from Ethereum altogether. The upcoming Ethereum 2.0 will overcome these issues, but the full transition to ETH 2.0 is still more than a year away.
Thankfully, Layer-2 and sidechain solutions have emerged to solve the scalability issues on Ethereum until ETH 2.0 arrives. Let’s find out what they are and how they differ.
Layer-2 scalability solutions
Before diving into Layer-2 (L2), we need to talk a little bit about Layer-1 (L1). Layer-1 solutions involve working on the main blockchain itself to improve scalability. The upcoming Ethereum 2.0 is an L1 solution because it’s a direct upgrade to the Ethereum network.
In contrast, the L2 solutions change how you use the blockchain. The Layer-2 protocols take some of the interactions away from the main blockchain. So, smart contracts on the main chain only process deposits and withdrawals and verify that all the things that happened off-chain have obeyed the rules.
Layer-2 protocols are specifically designed to integrate with the underlying blockchain to improve the transaction throughput. They rely on the consensus mechanism and security of the main chain.
To give you a concrete example, Immutable X is a Layer-2 scaling solution for NFTs on Ethereum. It allows developers to build marketplaces, games, apps, and more. While Ethereum handles only about 15 transactions per second and suffers from high-gas fees, an L2 solution like Immutable X handles 9,000 transactions per second with zero gas fees. It leverages Ethereum’s well-developed security, connections, and ecosystem to help developers.
The Immutable X protocol uses StarkWare’s ZK rollup technology to facilitate blazing fast transactions. The ZK rollup structure involves holding funds on the main chain by smart contracts and performing computation and storage off-chain. ZK (zero-knowledge) is a cryptographic mechanism where one entity can provide proof of particular information to another entity without revealing the information itself.
There are many other L2 scaling solutions as well. Optimistic rollups run on Ethereum’s base layer to enjoy the same security as Ethereum while running a larger number of smart contracts without overburdening the network. But its throughput is lower than that of ZK rollups.
Then there is the Plasma framework, which uses child or secondary blockchains to help the main chain in verification. The “child” chains use Ethereum as a trust and arbitration layer.
Bitcoin has its own L2 protocol called the Lightning Network, which bundles transactions from the main chain, deals with them off-chain, and then transfers the information back to the main chain. The Lightning Network also brings smart contract functionality to Bitcoin.
Unlike L2 solutions, sidechains are independent blockchains linked to the main chain. Sidechains don’t rely on the main blockchain for security. Instead, they have their own set of rules, consensus mechanisms, functionalities, and purposes. Establishing a sidechain requires immense effort and infrastructure as they can’t leverage the main chain’s security and connections.
Though they are independent of the main chain, they come together to form an entire ecosystem. Sidechains are linked to the main chain via a two-way peg. With a sidechain, the main chain’s role is to confirm batched transaction records, maintain security, and resolve disputes.
Polygon Network and xDai are examples of sidechains. xDai uses a delegated Proof-of-Stake consensus mechanism for fast and cheap stable transactions. It processes transactions in under five seconds and the gas fee for about 500 transactions is under $0.01. A bridge facilitates the transfer of tokens between xDAI and Ethereum.
Polygon creates a two-way peg between the main chain and its proprietary sidechain, dividing the workload. Users can transfer coins from the main chain to the sidechain to complete transactions. Once the transaction is confirmed on the sidechain, the coins are transferred back to the main chain. Transactions on the side chain are faster and cheaper than the main chain.
Unlike on L2 protocols, sidechain transactions are not private between participants. They are publicly recorded to the blockchain ledger.
Since most sidechains have much less computing power than the main chain, they are more vulnerable to potential attacks. If a sidechain gets hacked, it won’t compromise the security of the main chain. In case the main chain is hacked, the sidechain would not suffer but the peg could lose much of its value.
Earlier this month, a hacker stole more than $600 million worth of cryptocurrencies from the cross-chain interoperability protocol Poly Network. Notably, Poly Network is based on the sidechain and adopts a two-layer architecture. The hacker exploited a bug in the company’s system that allows different chains to communicate. Fortunately, the hacker has returned the stolen amount and Poly Network is returning the stolen assets to their rightful owners.
Vitalik Buterin, the co-founder of Ethereum, has voiced support for Optimistic rollups for the short-term and ZK rollups for the longer term. Sidechains and Layer-2 solutions are essential elements in solving the scalability issues of Layer-1 blockchains. Over the next few months, they both have the potential for breakthroughs. There is little doubt that they will continue to expand until Ethereum 2.0 arrives.
Source: Read Full Article