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

  • BTC Falls Below $60,000

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

  • ETH Drops Below $1600

    Market data shows that ETH has fallen below $1600, currently priced at $1597.55, with a 24-hour decline of 3.81%. The market is experiencing significant volatility, so please ensure proper risk management.

  • Billionaire Philippe Laffont Prefers Investing in Space Over Bitcoin

    Philippe Laffont, founder and portfolio manager of Coatue Management, stated on the Squawk Box program that he is currently unable to determine his stance on Bitcoin. He mentioned that he is rethinking Bitcoin's positioning and expressed a preference for investing in space over Bitcoin. (thestreet)

  • Tech Giants' Data Center Leasing Commitments Exceed $850 Billion

    On June 24, an analysis by Bloomberg of regulatory filings revealed that as tech giants compete to expand their server clusters, the total amount of future data center leasing commitments by large cloud computing companies has continued to rise over the past year, surpassing $850 billion. Last quarter, Meta added leasing commitments of $79 billion, a 76% increase from the previous period; as of March 31, the total reached $182.9 billion. Meta CEO Mark Zuckerberg has stated that the company plans to invest hundreds of billions of dollars in AI infrastructure by 2030. Microsoft followed closely, adding over $41 billion in leasing commitments, bringing its total to $196.6 billion.

  • Address with $34.61 Million Long Position in 21,000 ETH Faces $1.696 Million Loss at 18x Leverage

    According to on-chain analyst Ai Yi, a certain address took a long position of 21,000 ETH with 18x leverage yesterday, amounting to approximately $34.61 million. Currently, it is facing an unrealized loss of $1.696 million, with an opening price of $1,728.5 and a liquidation price of $1,590.1.

  • U.S. 10-Year Treasury Yield Falls to 4.4138%, Lowest Since May 11

    On June 24, the yield on U.S. 10-year Treasury bonds fell to 4.4138%, the lowest level since May 11. The yield on U.S. 30-year Treasury bonds dropped to 4.8572%, the lowest since April 15.

  • Crypto Market Liquidations Reach $134 Million in the Last Hour, with $125 Million in Long Liquidations

    According to CoinGlass data, the total liquidation amount across the network in the last hour reached $134 million, with long liquidations accounting for $125 million and short liquidations amounting to $8.539 million.

  • BTC Falls Below $61,000

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

  • International Oil Prices Plunge as U.S. Oil Futures Fall Below $70

    On June 24, international crude oil prices continued to decline, with U.S. WTI crude oil futures falling below the $70 per barrel mark during trading, down 4.4% for the day, reaching a new low since March 2, and reverting to levels seen before the outbreak of the Iran conflict. Brent crude oil futures for August dropped 4.5%, settling at $73.6 per barrel. Market expectations of easing tensions in the Middle East, a recovery in Iranian oil supply, and rising interest rate expectations due to U.S. inflation have pressured oil prices.

  • Strategy Stock Price Falls Below $100 for the First Time Since March 2024

    Strategy's stock price has fallen below $100 for the first time since March 2024.