Off-chain Scalability Depth Analysis: From Concept to State Channel Practice

Off-chain Scalability Depth Analysis

1. The Necessity of Scaling

The future vision of blockchain is decentralization, security, and scalability, but usually only two of these can be achieved, which is known as the blockchain trilemma. For many years, people have been exploring how to improve the throughput and transaction speed of blockchain while ensuring decentralization and security, that is, to solve the scalability issue, which is one of the hot topics in the current development process of blockchain.

The decentralization, security, and scalability of blockchain are defined as follows:

  • Decentralization: Anyone can become a node to participate in the production and verification of the blockchain system. The more nodes there are, the higher the degree of decentralization, thus ensuring that the network is not controlled by a small group.

  • Security: The higher the cost to gain control over the blockchain system, the higher the security, and the chain can resist a larger proportion of participant attacks.

  • Scalability: The ability of blockchain to handle a large number of transactions.

Ten Thousand Word Depth Research Report: Comprehensive Analysis of off-chain Scaling

The first significant hard fork of the Bitcoin network originated from scalability issues. As the number of users and transaction volume increased, the 1MB block limit of the Bitcoin network began to face congestion; since 2015, the Bitcoin community has had disagreements regarding scalability, with one side supporting larger blocks and the other side advocating for the Segwit solution to optimize the main chain structure. On August 1, 2017, the side supporting scalability independently developed an 8MB block client system that began operating, leading to the first significant hard fork in Bitcoin's history, resulting in the creation of the new cryptocurrency BCH.

The Ethereum network also chooses to sacrifice some scalability to ensure the security and decentralization of the network. Although Ethereum does not limit the block size like Bitcoin, it sets a cap on the gas fees that can be accommodated in a single block, but the goal is to achieve trustless consensus and ensure the widespread distribution of nodes.

From the rise of on-chain applications such as CryptoKitties in 2017, the DeFi summer, to later GameFi and NFTs, the market's demand for throughput has been increasing. However, Ethereum can still only process 15-45 transactions per second. This has led to increased transaction costs and longer settlement times, making it difficult for most DApps to bear operational costs, causing the entire network to become slow and expensive. The issue of blockchain scalability urgently needs to be addressed. The ideal scalability solution is to increase the transaction speed and throughput of the blockchain network as much as possible without sacrificing decentralization and security.

2. Types of Scalability Solutions

We categorize the scaling solutions into two main types: on-chain scaling and off-chain scaling, based on the criterion of "whether to change a layer of the mainnet."

2.1 On-chain Scaling

Core concept: a solution to achieve scalability by altering a layer of the mainnet protocol, with the current main solution being sharding.

There are various solutions for on-chain scalability, this article will not elaborate, briefly listing two:

  • The first solution is to expand the block space, which means increasing the number of transactions packed in each block. However, this will raise the requirements for high-performance node devices, increase the entry threshold for nodes, and reduce the degree of "decentralization".

  • Plan two is sharding, which divides the blockchain ledger into several parts. Instead of every node participating in all bookkeeping, different shards, that is, different nodes, are responsible for different bookkeeping. Parallel computing can handle multiple transactions simultaneously; this can reduce the computational pressure on nodes and the entry threshold, improving transaction processing speed and the degree of decentralization. However, this means that the entire network's computing power is dispersed, which will reduce the overall "security" of the network.

Modifying the code of a layer one mainnet protocol may result in unpredictable negative impacts, as any slight security vulnerability in the underlying layer could severely threaten the overall security of the network, which may be forced to undergo a fork or interrupt for repair upgrades.

2.2 off-chain scaling

Core concept: a scaling solution that does not change the existing Layer 1 mainnet protocol.

The off-chain scaling solutions can be further subdivided into Layer 2 and other solutions:

  • Layer2: A second-layer network built on top of the main chain, including State Channels, Plasma, Rollups, etc.
  • Other solutions: Sidechains, Validium, etc.

Ten Thousand Word Depth Research Report: Comprehensive Analysis of off-chain Scalability

3. Off-chain scaling solutions

3.1 State Channels

3.1.1 Overview

State channels stipulate that users only need to interact with the main network when opening, closing, or resolving disputes in the channel, while keeping interactions between users off-chain to reduce transaction time and costs, and to achieve unlimited transaction frequency.

State channels are simple P2P protocols suitable for "turn-based applications" such as two-player chess games. Each channel is managed by a multi-signature smart contract running on the mainnet, which controls the assets deposited into the channel, validates state updates, and arbitrates disputes between participants. After the participants deploy the contract on the network, they deposit funds and lock them in place, and after both parties sign to confirm, the channel officially opens. The channel allows participants to conduct an unlimited number of off-chain free transactions ( as long as the net transfer value does not exceed the total amount deposited ). Participants take turns sending state updates to each other, waiting for the other party's signature confirmation. Once the other party's signature is confirmed, the state update is considered complete. Normally, state updates agreed upon by both parties are not uploaded to the mainnet; they only rely on the mainnet for confirmation in case of disputes or when the channel is closed. When it's necessary to close the channel, any participant can submit a transaction request on the mainnet, which will be executed on-chain immediately if it receives unanimous signature approval; if other participants do not give signature approval, then everyone must wait for the "challenge period" to end before receiving the remaining funds.

In summary, the state channel solution can greatly reduce the computational load on the mainnet, improve transaction speed, and lower transaction costs.

Ten Thousand Words Depth Research Report: Comprehensive Analysis of off-chain Scalability

3.1.2 Timeline

  • In February 2015, Joseph Poon and Thaddeus Dryja released a draft of the Lightning Network white paper.
  • In November 2015, Jeff Coleman systematically summarized the concept of State Channels and proposed that Bitcoin's Payment Channel is a sub-case of State Channels.
  • 2016/01, Joseph Poon and Thaddeus Dryja officially published the white paper "The Bitcoin Lightning Network: Scalable Off-Chain Instant Payments" proposing a scaling solution for the Bitcoin Lightning Network Payment Channel( payment channel), which is used solely for processing transfer payments on the Bitcoin network.
  • In November 2017, the first design specification for State Channels based on the Payment Channel framework, called Sprites, was proposed.
  • In June 2018, Counterfactual proposed a detailed design for Generalized State Channels, which is the first design fully related to state channels.
  • In October 2018, the article "Generalised State Channel Networks" proposed the concepts of State Channel Networks and Virtual Channels.
  • In February 2019, the concept of state channels was extended to N-Party Channels, and Nitro is the first protocol established based on this idea.
  • 2019/10, Pisa expanded the concept of Watchtowers to address the issue of all participants needing to be continuously online.
  • 2020/03, Hydra proposed Fast Isomorphic Channels.

Ten Thousand Character Depth Research Report: Comprehensive Analysis of off-chain Scalability

3.1.3 Technical Principles

The general workflow of state channels is as follows:

  1. Alice and Bob deposit funds from their personal EOA to the on-chain contract address, and these funds are locked in the contract until they are returned to the user when the channel is closed; after both parties sign to confirm, the state channel between the two is officially opened.

  2. Alice and Bob can conduct unlimited off-chain transactions, with participants communicating with each other through encrypted signed messages ( instead of communicating with the blockchain network ). Both parties need to sign each transaction to prevent double spending. Through these messages, they propose updates to their account states and accept the state updates proposed by the other party.

  3. If Alice wants to close the channel and end the transaction with Bob, Alice needs to submit the final state of her account to the contract. If Bob signs to approve, the contract will release the locked funds back to the corresponding user based on the final state. If Bob does not respond with a signature, the contract will release the locked funds back to the corresponding user after the challenge period ends.

Ten Thousand Words Depth Research Report: Comprehensive Analysis of off-chain Expansion

3.1.4 Advantages and Disadvantages

Advantages:

  • Instant trading, high throughput
  • Low transaction costs
  • Enables privacy transactions
  • Security is ensured by the underlying blockchain.

Disadvantages:

  • Need to lock funds
  • Not suitable for large-scale multi-party transactions
  • Participants need to be online frequently.
  • Some scenarios are restricted

3.1.5 Application

Bitcoin Lightning Network:

  • Overview: The Lightning Network is a micropayment channel on the Bitcoin network, with a technological evolution from unidirectional payment channels to bidirectional payment channels and then to multi-party payment networks. By using off-chain micropayment channels and leveraging intermediaries to form a transaction network, it can solve the scalability issue of the Bitcoin network. The process follows "Deposit ( establish channel ) → Lightning Network transaction ( update channel status ) → Refund/settlement ( close channel )"; theoretically, it can handle one million transactions per second.

  • Timeline:

    • February 2015, released draft of the white paper
    • The official version of the white paper was released in January 2016 and Lightning Labs was established.
    • On March 15, 2018, the first mainnet version LND 0.4 was released.
    • At the beginning of 2021, the public capacity was approximately $40 million, with about 100,000 users.
    • In June 2021, El Salvador adopted Bitcoin as legal tender and in September released the Chivo wallet based on the Lightning Network.
    • In 2022, 26 cryptocurrency exchanges announced support for the Lightning Network.
    • In October 2022, Lightning Labs released the alpha version of the Taro protocol, which will be used in the future to mint, send, and receive assets on the Bitcoin network.
    • As of November 23, 2022, the Lightning Network had 76,236 payment channels with channel funds of 5049 BTC(81.8M USD)
  • Ecological Development: The Lightning Network ecosystem includes from bottom to top: the underlying BTC network, core infrastructure ( solutions, node and liquidity services ), and various DApps. As of November 2022, there are over 20 categories and more than 100 applications based on the Lightning Network, mainly including payments, wallets, node management, browser extensions, podcasts, and streaming.

Ten Thousand Character Depth Research Report: Comprehensive Analysis of off-chain Scalability

Ethereum Lightning Network:

  • Overview: The Lightning Network is a micropayment channel based on Ethereum, similar to the Lightning Network, which expands on-chain transactions by establishing state channels, aiming to achieve near-instant, low-cost, and scalable ERC20 token payments.

  • Timeline:

    • Founded in 2017, the founder Heiko Hees was a core developer of Ethereum.
    • On October 17, 2017, the ICO raised over 30 million USD.
    • The first Raiden Light Client - Alderaan was launched on the Ethereum mainnet in May 2020.
    • At the end of 2021, multiple exchanges delisted $RDN.
  • Currently not widely adopted, reasons include:

  1. High entry threshold: when Ethereum Gas fees are too high, the cost of opening channels is too high.
  2. More advanced scaling technologies have emerged: Better scaling solutions like Rollup limit the use cases of Raiden Network.
  • Ecological Development: Currently, the ecological development is slow, and the team is transforming it to run on the Ethereum Layer 2 Rollup network to further reduce the Gas fees for creating State Channels. In May 2022, it was announced to go live on Arbitrum, becoming an L2 running on top of L2. In the future, it will shift to being Rollups-centric, serving as a complementary solution coexisting with Rollups.

Celer Network:

  • Overview: Celer Network is essentially a lightning network with an added incentive layer ( token $CELR), which can build fast, user-friendly, low-cost, and secure high-frequency interaction type blockchain DApps through off-chain scaling technology and incentive economic models, such as electronic
BTC1.33%
View Original
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • 6
  • Share
Comment
0/400
MemecoinTradervip
· 3h ago
running sentiment analysis on this l2 narrative... bullish signals detected but the real alpha is in manufacturing consensus rn
Reply0
Fren_Not_Foodvip
· 3h ago
The Triangle Impossible Tsk Tsk Tsk
View OriginalReply0
ChainMaskedRidervip
· 3h ago
Sigh, the Unholy Trinity has probably been talked to death.
View OriginalReply0
AirdropLickervip
· 3h ago
If you can't invest, just jump off a building!
View OriginalReply0
RektButStillHerevip
· 3h ago
Triangle around half a day is not as good as talking about tps.
View OriginalReply0
BottomMisservip
· 3h ago
Peh, classic choose two out of three
View OriginalReply0
Trade Crypto Anywhere Anytime
qrCode
Scan to download Gate app
Community
English
  • 简体中文
  • English
  • Tiếng Việt
  • 繁體中文
  • Español
  • Русский
  • Français (Afrique)
  • Português (Portugal)
  • Bahasa Indonesia
  • 日本語
  • بالعربية
  • Українська
  • Português (Brasil)