Cointime

Download App
iOS & Android

Breaking Down Ethereum & Scalability: Layer 2 (L2) Sidechains

Validated Project

Ethereum is renowned for its programmability and is currently home for approximately 3000 DApps and 5000 smart contracts. Though this number calls for a big shout out, it could have been much more extensive. The dearth in blockchain such as scalability, cost and relaxed transactions are capping the DApps from choosing Ethereum. What next??

Thanks to the blockchain fanatics. Researchers in the domain have come up with various ideas to solve the scalability issue. Some straight suggestions are: changing the consensus mechanism, optimizing data storage in a block, sharding and alternatives to blockchain storage structures such as like using DAG and so on. Well, all these solutions propose changes to the underlying blockchain infrastructure and protocols. They are termed Layer 1 or L1 solutions. However, changing the fundamentals of a currently live blockchain platform is both challenging and risky. It can root to compatibility issues that may impulse forking.

But in Ethereum we do have the options to bring changes that do not affect the live blockchain layer. Ethereum has built a programmable base layer for deploying smart contracts and facilitating ether transfers. It also supports creating applications on top of this base layer, which can help improve the scalability. Such solutions are termed Layer 2 or L2.

L2 is a collective term used to denote those protocols which try to push the majority of activities “off-chain” and report to a smart contract on-chain (L1) with a summary of its off-chain activity. Since L1 is freed from intensive computations and storage requirements, it helps improve the scalability.

Working Off-chain — What is it like?

Every time a transaction happens, it should be broadcasted to all the nodes, verified by all of them and finally added in a block by a validator. The transaction will take a minimum of 12 seconds to get included in a block. If we had a smaller network with a different consensus mechanism, the transaction processing time could have been reduced.

Let us see an example.

In the Ethereum network, transactions from an account can only occur sequentially. Alice wishes to transfer some tokens to Bob, Carol, David and Elsa. She has to first transact with Bob, wait for it to be confirmed, next transact with Carol and so on. When she finishes the transactions, it will take approximately 48 seconds (assuming an optimal situation) or longer.

Imagine we have a sidechain: A minor blockchain running alongside the leading Ethereum network. It will have its consensus mechanism and an independent ledger. In this sidechain, Alice can perform the same transactions, using its native assets (let’s say TKN) at a lower cost and faster pace.

How can Alice use the sidechain to perform the transactions?

> Alice will transfer a part of her assets to the sidechain using a bridge. The bridge is a two-way peg component that allows the transfer of assets back and forth between blockchains. Just like how you transfer money from your bank account to wallet applications like Paytm, Mobikwik etc. But this may take longer.

> Alice then initiates the transfer to Bob, Carol, David and Elsa on the sidechain. The nodes in the sidechain network process these transactions. Since it’s a shorter and faster chain, the transactions happen faster.

>Occasionally, the sidechain pushes a proof, which will be a comprehensive representation of a list of L2 transactions, onto the Ethereum chain. It can be a hash of headers of sidechain blocks, a Merkle proof and so on. This will be done using a smart contract deployed on the mainchain. Anytime the state of the sidechain can be confirmed by referring to the proof on Ethereum.

Proofs are usually based on cryptographic algorithms. A simple example will be Merkle tree. A list of data items is represented using repeated hashing in a Merkle tree. The Merkle root serves as the finger print of the data set. Other techniques include Zero-knowledge proofs, polynomial commitments etc.

>The users can transact on the sidechain without informing the main chain. If the users want to transfer the funds to the main chain, they use the bridge. Since chains are independent, assets are typically locked on one chain and minted(created) on another. They are burned(destroyed) and unlocked when they are transferred back.

An off-chain process will facilitate all the interactions between sidechain and Ethereum. This process will act as an intermediary by interacting with smart contracts on both chains.

What is L2 Scaling Solutions?

The basic idea of L2 is to build a secondary framework which can handle transactions off-chain. The L2 does the transaction processing, whereas the state changes will be summarized and updated to L1. A fundamental requirement is L2 should preserve the security and risk models of L1. This also implies that, if in case, the L2 needs to be abandoned, users should be able to recover their state from L1.

Strictly speaking, the sidechain model we described cannot be counted as L2 scaling.

Let’s see the reasons.

Remember that sidechains are independent blockchains that work on their consensus mechanism and exist differently from the leading network. Nodes within the sidechain network are responsible for processing transactions, adding transactions to blocks, and maintaining consensus across the network. Note that security is the responsibility of the sidechain; it is not directly inherited from Ethereum.

Some popular sidechains are Polygon and Gnosischain.

How can L2 improve Ethereum?

L2 options offer the advantage of smaller and faster networks alongside utilizing the security and decentralization of Ethereum.

L2 applications try to reduce the workload of the main network. It will perform the major computations to itself (off-chain) and occasionally communicate with the main chain. It uses the decentralized security features offered by L1 as a guarantee. So main chain will continue to serve decentralization, security and data availability, whereas the L2 protocol will handle scalability.

State channels, Rollups, and Plasma chains are well-known L2 solutions. We will see them in the upcoming blogs.

References

[1] Cosimo Sguanci, Roberto Spatafora, Andrea Mario Vergani, “Layer 2 Blockchain Scaling: a Survey”.

[2]Gangwal, Ankit & Gangavalli, Haripriya & Thirupathi, Apoorva. (2022). A Survey of Layer-Two Blockchain Protocols.

[3]https://ethereum.org/en/layer-2/

Comments

All Comments

Recommended for you

  • US Considers Easing Sanctions on Shadow Fleet to Lower Shipping Rates

    On October 15, a US official stated on Wednesday that the Trump administration is considering easing sanctions on vessels known as the 'shadow fleet.' These ships have previously transported oil and petroleum products from countries such as Russia, Iran, and Venezuela. This move aims to reduce the currently historically high global shipping rates. Shortly before this, President Trump had temporarily lifted sanctions on Russian diesel, a decision that drew strong criticism from Ukrainian President Zelensky, several European governments, and some Republican senators. The US official revealed that current discussions focus on whether the US will allow previously sanctioned vessels to transport 'legitimate oil.' Here, 'legitimate oil' refers to crude oil or petroleum products not subject to US sanctions, rather than oil from Russia and Iran that is under sanctions. The official stated that this move aims to facilitate the export of more refined products and crude oil from the Gulf region.

  • Dollar Index Erases All Gains Since CPI Report Release

    On October 15, the Dollar Index (DXY) slowly declined in the Asian session, completely erasing all gains since the release of the U.S. September CPI data yesterday (which had peaked with a cumulative increase of about 70 points), now reported at 102.16. The British Pound against the U.S. Dollar (GBP/USD) and the Euro against the U.S. Dollar (EUR/USD) both rose about 0.3%, currently reported at 1.3231 and 1.1197, respectively. (Jin10)

  • South Korean Stock Index Opens Down Over 5%

    On October 15, the South Korean KOSPI index fell below 6000 points, dropping 5.59% during the day. SK Hynix fell over 7%, while Samsung Electronics dropped over 6%. (Jinshi)

  • Fed's Daly: Rate Hikes May Be Necessary, But Not Urgent

    On October 15, Mary Daly, President of the San Francisco Federal Reserve, stated on Wednesday that the Fed may need to further raise short-term interest rates to curb excessive inflation. However, she also pointed out that there is no need to take such action at the Fed's meeting on October 27-28. "It is very likely that we will need to make further adjustments, but regarding the timing of those adjustments, I think we are still deliberating," Daly said. "I don’t feel there is a need to rush into a decision with limited information. I believe we have enough time."

  • BTC Falls Below $82,000

    Market data shows that BTC has fallen below $82,000, currently priced at $81,984.48, with a 24-hour decline of 2.01%. The market is experiencing significant volatility, so please ensure proper risk management.

  • BTC Drops Below $83,000

    Market data shows that BTC has fallen below $83,000, currently priced at $83,015.81, with a 24-hour decline of 0.46%. The market is experiencing significant volatility, so please ensure proper risk management.

  • ETH Surpasses $2500

    Market data shows that ETH has surpassed $2500, currently priced at $2500.4, with a 24-hour decline of 0.23%. The market is experiencing significant volatility, so please ensure proper risk management.

  • Standard Chartered Launches Cryptocurrency Trading Service in UAE for High-Net-Worth Clients

    On October 14, Standard Chartered announced the launch of a cryptocurrency trading service in the UAE aimed at high-net-worth clients, having obtained the relevant license from the Dubai Virtual Assets Regulatory Authority (VARA). Eligible clients can buy and sell BTC and ETH directly through their existing Standard Chartered accounts without the need for independent wallets or third-party trading platforms, with the bank responsible for asset custody and transaction settlement. This service is launched in partnership with Zodia Markets and is initially available only to professional investors in the UAE, with plans to expand to other markets in the future. Standard Chartered stated that this is the first direct cryptocurrency trading service offered to wealth management clients and the first of its kind by an international bank in the UAE.

  • US Spot Bitcoin ETF Sees Net Inflow of $175.7 Million Yesterday

    On October 14, according to monitoring data from Farside Investors, the US spot Bitcoin ETF saw a net inflow of $175.7 million yesterday.

  • US Spot Ethereum ETF Sees Net Inflow of $24.8 Million Yesterday

    On October 14, according to monitoring data from Farside Investors, the US spot Ethereum ETF experienced a net inflow of $24.8 million yesterday.