23.05.2024
Share this post
in social networks
150 140
Layer 2 solutions and scaling – Developing technologies to increase bandwidth and reduce fees in blockchains, for example through Layer 2 solutions or sidechains.

Layer 2 solutions and scaling - Developing technologies to increase bandwidth and reduce fees in blockchains, for example through Layer 2 solutions or sidechains.

Lack of scalability is the number one problem of the largest Layer 1 blockchains. Due to low scalability, the throughput of leading decentralized systems cannot match that of centralized payment systems. For example, the TPS (Transactions Per Second) in the Bitcoin network is about 7, while traditional VISA and MasterCard payment channels process an incomparably higher number of TPS (24,000 and 5,000, respectively). And the lower the throughput, the higher the fees: during periods of high network utilization, the transaction fees increase.

Blockchain sidechains and various Layer 2 scaling tools are mechanisms that solve the problems of processing speed and high transaction costs in decentralized Layer 1 systems.

Let’s take a look at how these tools work, how they are integrated into the blockchain structure, and where the development of Layer 2 technologies is headed.

Preconditions for implementing Layer 2 solutions

Layer 1 and Layer 2 solutions

Layer 1 (L1, the first layer) are classic blockchains, such as Bitcoin and Ethereum, whose infrastructure allows transactions to be verified and finalized without the involvement of other networks.

Layer 2 (L2, the second layer) are offchain solutions that operate outside the underlying network and are designed to address the issues of improving the efficiency of L1 blockchains. In particular, their functionality allows them to increase throughput and offer reduced fees in the blockchain without compromising the security of the underlying network. There are many types of L2 scaling solutions, but they all serve the same purpose — to offload some of the underlying blockchain’s tasks off the network.

Background and essence of L2 scaling solutions

Background and essence of L2 scaling solutions

The development of the Bitcoin and Ethereum blockchains has shown that improving their scalability is a challenge. The largest networks provide security using a distributed consensus model with multiple layers of independent verification. The systems could not keep up with the increasing demand with their internal resources. This is where Layer 2 protocols entered the arena, building on Layer 1 security and consensus to provide validation of required transaction arrays without burdening the core network.

Thus, L2-tools to a certain extent solve the so-called “blockchain trilemma”, popularized by Vitalik Buterin and actively applied on the Ethereum platform. According to this theory, based on the ATS theorem hypothesized by American scientist Eric Brewer in 2000, it is virtually impossible to achieve the same level of development of such properties as decentralization, security and scalability in a blockchain. And in reality, public blockchains, while demonstrating all the advantages of decentralization and security, are unable to autonomously compensate for the difficulties of insufficient bandwidth.

Blockchain developers are currently working hard to create optimal scaling solutions at both layers (L1 and L2).

Layer 1 projects aim to change the architecture of the underlying blockchain, which is time-consuming and labor-intensive. Layer 2 solutions, on the other hand, are based on external protocols that offer the advantages of ease of implementation and rapid capacity expansion.

L2 solutions typically consist of two parts: a network that directly processes the transaction and a binding smart contract on the L1 blockchain. Transaction execution and computation take place on the network, while the smart contract resolves disputes and reaches consensus on the state of the L2 solution by making necessary changes to the blockchain based on the evidence presented to it.

The main types of Layer 2 solutions

The main types of Layer 2 solutions

Sidechains

This type of scaling solution does not adopt the security of the underlying network and therefore sidechains are not considered full-fledged L2 solutions, despite the fact that they have a lot in common with them and provide significant bandwidth gains. According to Vitalik Buterin, the current trend in the development of L2 technologies has led to a certain “blurring” of concepts, where certain solutions can be classified as either Layer 1 or Layer 2. Thus, depending on the context and the problems being solved, a tool can be qualified in different ways.

Sidechains are separate blockchains with their own consensus algorithm and block formation rules, with a simple cross-network transfer mechanism to communicate with the underlying network. However, the linking smart contract does not verify the trustworthiness of the sidechain network and users of the underlying blockchain trust it a priori. This unconditional trust in the gatekeepers acting as a bridge between the mainchain and the sidechain is considered to be the main problem with this type of solution, despite its advantages.

The most famous and successful example of using Layer 2 is considered to be the Polygon project, which started in 2017 as a Matic Network sidechain for Ethereum scalability, and has developed into a huge ecosystem for building scalable applications with minimal fees and excellent user experience metrics on Layer 2.

Rollups

The key difference between sidechains and rollups is that the latter allow the underlying blockchain to verify the validity of the data provided.

Rollups work on the principle of aggregating a large number of transactions and then batching them to the underlying blockchain through a single transaction containing the aggregated data. Rollups are one of the most promising L2 scaling solutions and are divided into two categories depending on how the data is verified:

  • Optimistic Rollups;
  • Zero-Knowledge Rollups (ZK-Rollups).
  • According to experts, the trend of using optimistic rollups will continue for the next few years, but later on, zk-rollups will become the key technology because they are faster and more efficient.

    Let’s take a closer look at how these solutions work and how they differ.

    Optimistic Rollups

    Optimistic rollups are based on the optimistic assumption that all summarized data translated to the blockchain is trustworthy. To protect against fraudulent activity, this type of rollup includes the ability to dispute transactions. In such cases, once a claim is made, the transaction is sent to the underlying network for verification and dispute resolution, which takes additional time and requires the losing party to pay costs. Some of the most well-known projects using optimistic rollups are Arbitrum, Optimism and MetisDAO. Hundreds of major DeFi protocols (Uniswap, SushiSwap, 1inch, etc.) operate using similar solutions.

    zk-rollups

    Zero-Knowledge Rollups use Zero-Knowledge Proof, a cryptographic method for verifying transactions, to confirm the validity of bundled data without revealing the original data contained in the bundle. This revolutionary method, compared to optimistic rollups, reduces the time to verify the validity of transactions while maintaining additional security measures.

    Currently, there are some problems observed in applying this Layer 2 solution to DeFi due to technical compatibility issues. ZK-rollups are widely used and developed by Polygon zkEVM, Matter Labs, StarkWare, Immutable X, Linea, eCrypt and others.

    State Channels

    State Channels are solutions that provide two-way communication between the parties to a transaction, where all transactions take place off chain, and only the first and last transactions are recorded in the mainchain. The parties switch to blockchain state channels using multi-signature, perform the necessary transactions, then the “channel state” is sent to the blockchain for confirmation. The security of the channels is ensured by smart contracts.

    This is the cheapest and fastest Layer 2 scaling solution available, but also one of the most controversial. Years of research and development have failed to address the security concerns of this Layer 2 tool, which is vulnerable to certain types of attacks.

    The state channel technology is used in Bitcoin Lightning and Raiden Network Ethereum.

    Advantages of Layer 2 scaling solutions

    Advantages of Layer 2 scaling solutions

  • Ease of implementation and “dismantling”. Compared to L1 solutions, L2 scalability tools are an easier and faster way to increase scalability without directly affecting the underlying blockchain. They do not change the architecture of the underlying network and can be quickly shut down when needed.
  • High speed. Layer 2 solutions enable near-instantaneous processing and fast, real-time cryptocurrency transactions.
  • Low fees. Transactions are validated outside the main blockchain and combined into a single Layer 1 transaction, significantly reducing commission costs.
  • High Potential. With high transaction speeds and low fees, L2 solutions improve the user experience and can be expected to scale through further innovation.
  • Disadvantages of L2 scaling solutions

  • Risks of reduced security. Layer 2 integration can weaken the security of the underlying blockchain, as some aspects of it are “outsourced” to the Layer 2 network in order to achieve higher throughput.
  • Interoperability issues. New chains created on top of the underlying blockchain can exacerbate blockchain interoperability issues, creating additional complexity in how Layer 1 networks communicate with each other.
  • Insufficient impact to fundamentally solve the scalability problem. L2 tools do not solve the problem as a whole, but rather mitigate the problems of Layer 1 blockchains by compensating for their shortcomings.
  • In conclusion

    Layer 2 scaling is a pragmatically ideal solution for projects that need to scale immediately, while maintaining compatibility with existing blockchains and taking into account some security risks. Projects with long-term goals can afford L1 solutions, which require careful design and significant time to implement. At the same time, leading experts are exploring hybrid solutions that can take advantage of both approaches to create more scalable and secure decentralized ecosystems.

    In any case, a solid foundation for targeted Layer 2 solutions is already in place, and 2023 was marked by the rapid development of the L2 segment. The DeFi platform sector, which uses Layer 2 solutions, will grow almost fourfold, and the TVL of Layer 2 networks will reach $16 billion by the end of 2023, starting from a total blockchain value of $4.5 billion in January.

    So we’ll be watching for further developments.

    Thank you for your attention!

    AnyExchange is an international exchanger that allows you to convert cryptocurrency at the most favorable exchange rate . The money transfers are also available on our website worldwide.

    More news