Comprehensive Guide to Off-Chain Scaling Solutions: The Development History of State Channels, Sidechains, and Layer 2

Off-chain Scalability Depth Analysis

Author: Cobo Ventures Team

1. The Necessity of Scalability

The future of blockchain is a grand vision: decentralization, security, and scalability. However, blockchain can usually only achieve two of these three requirements, and meeting all three is known as the blockchain's impossible triangle problem. For years, people have been exploring how to solve this dilemma, focusing on how to improve the throughput and transaction speed of blockchain while ensuring decentralization and security, which is one of the hot topics discussed in the current development process of blockchain.

Let us first broadly define the decentralization, security, and scalability of blockchain:

  • 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 of large centralized participants.
  • Security: The higher the cost incurred to gain control of the blockchain system, the higher the security, allowing the chain to resist attacks from a larger proportion of participants.
  • Scalability: The ability of a blockchain to handle a large number of transactions.

The first significant hard fork of the Bitcoin network originated from the scaling issue. As the number of Bitcoin users and transaction volume increased, the Bitcoin network, with a block size limit of 1MB, began to face congestion issues; starting in 2015, there were disagreements within the Bitcoin community regarding the scaling issue. One side, represented by Bitcoin ABC, supported expanding the block size, while the other side, represented by Bitcoin Core, advocated for the small block approach, believing that the Segregated Witness (Segwit) proposal should be used to optimize the main chain structure. On August 1, 2017, Bitcoin ABC's independently developed client system with an 8MB block size began to operate, leading to the first significant hard fork in Bitcoin's history, which also resulted in the creation of a new cryptocurrency, BCH.

Similarly, the Ethereum network also chooses to sacrifice some scalability to ensure the security and decentralization of the network; although the Ethereum network does not limit the transaction volume by restricting block size like the Bitcoin network, it has effectively shifted to setting a cap on the gas fees that a single block can accommodate. However, the goal is the same: to achieve Trustless Consensus and ensure a wide distribution of nodes. Whether the cap is removed or raised, many smaller nodes that lack bandwidth, storage, and computing power will be eliminated (.

Since the emergence of on-chain applications such as CryptoKitties in 2017, DeFi summer, and later GameFi and NFTs, the market's demand for throughput has been increasing. However, even the Turing-complete Ethereum can only handle 15 to 45 transactions per second ) TPS (, which results in rising transaction costs, longer settlement times, and most DApps struggling to bear operating costs. The entire network has also become slow and expensive for users, highlighting the urgent need to address blockchain scalability issues. The ideal scalability solution is to improve the transaction speed of the blockchain network ) shorter finality time ( and transaction throughput ) higher TPS ( without sacrificing decentralization and security.

![Ten Thousand Character Depth Research Report: Comprehensive Analysis of off-chain Scaling])https://img-cdn.gateio.im/webp-social/moments-7d930821d982f99c43cf5400e4db2175.webp(

2. Types of Scalability Solutions

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

) 2.1 On-chain Scalability

Core concept: A solution to achieve scalability by modifying a layer of the main network protocol, with the current major solution being sharding.

There are various solutions for on-chain scaling, this article will not elaborate, the following briefly lists two solutions:

  • Option one is to expand the block space, that is, to increase the number of transactions packed in each block, but this will raise the requirements for high-performance node devices, increase the threshold for node participation, and reduce the degree of "decentralization".
  • Solution two is sharding, which divides the blockchain ledger into several parts. Instead of each node participating in all accounting, different shards, or different nodes, are responsible for different accounting. Parallel computing can handle multiple transactions simultaneously; this reduces the computational pressure on nodes and lowers the entry threshold, improving transaction processing speed and decentralization. However, this means that the computing power of the entire network is dispersed, which may reduce the overall network's "security."

Changing the code of a layer 1 mainnet protocol can have unpredictable negative effects, as any minor security vulnerabilities in the underlying system can severely threaten the security of the entire network, which may be forced to undergo a fork or undergo emergency repair upgrades. For example, the 2018 Zcash inflation bug incident: Zcash's code was modified based on the Bitcoin version 0.11.2 code, and in 2018 an engineer discovered a critical vulnerability in its underlying code, allowing tokens to be minted infinitely. The team then spent 8 months secretly patching the vulnerability, and the incident was only made public after the fix.

2.2 off-chain scaling

Core Concept: A scaling solution that does not alter the existing Layer 1 mainnet protocol.

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

![Ten Thousand Characters Depth Report: Comprehensive Analysis of off-chain Scalability]###https://img-cdn.gateio.im/webp-social/moments-087d35594a04d33375b8199b93eb355e.webp(

3. off-chain Scaling Solutions

) 3.1 State Channels

3.1.1 Overview

State channels stipulate that users only need to interact with the mainnet when the channel is opened, closed, or when resolving disputes, and that interactions between users are conducted off-chain, thereby reducing the time and monetary costs of user transactions, and allowing for an unlimited number of transactions.

State channels are simple P2P protocols suitable for "turn-based applications", such as a two-player chess game. Each channel is managed by a multi-signature smart contract running on the mainnet, which controls the assets deposited into the channel, verifies state updates, and arbitrates disputes between participants ### based on fraud proofs with signatures and timestamps (. After participants deploy the contract on the blockchain network, they deposit a sum of funds and lock it. Once both parties sign and confirm, the channel is officially opened. The channel allows for unlimited off-chain free transactions ) between participants as long as their net transfer value does not exceed the total amount of tokens deposited (. Participants take turns sending state updates to each other, waiting for the other's signature confirmation. Once the other party signs and confirms, the state update is considered complete. Normally, mutually agreed state updates are not uploaded to the mainnet; they only rely on confirmation from the mainnet in case of disputes or when closing the channel. When the channel needs to be closed, either participant can make a transaction request on the mainnet, and if the exit request receives unanimous signature approval, it is executed on-chain immediately, meaning the smart contract distributes the remaining locked funds based on the final balance of each participant in the channel; if other participants do not sign for approval, all must wait for the "challenge period" to end before they can receive the remaining funds.

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

![Ten Thousand Character Depth Research Report: Comprehensive Analysis of off-chain Scalability])https://img-cdn.gateio.im/webp-social/moments-ead28de03be9fc22dcfe3f679ee36bc5.webp(

)# 3.1.2 Timeline

  • In February 2015, Joseph Poon and Thaddeus Dryja published a draft of the Lightning Network white paper.
  • In November 2015, Jeff Coleman systematically summarized the concept of State Channel for the first time, proposing that Bitcoin's Payment Channel is a sub-case of the State Channel concept.
  • In January 2016, Joseph Poon and Thaddeus Dryja officially published the white paper "The Bitcoin Lightning Network: Scalable Off-Chain Instant Payments" proposing the scalability solution of the Bitcoin Lightning Network, Payment Channel###, which is used solely for handling transfer payments on the Bitcoin network.
  • In November 2017, the first design specification for State Channels based on the Payment Channel framework, Sprites, was proposed.
  • 2018/06, Counterfactual proposed a very detailed Generalized State Channels design, which is the first design fully related to state channels.
  • In October 2018, the article Generalised State Channel Networks introduced 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 built on that idea.
  • 2019/10, Pisa expanded the concept of Watchtowers to address the issue of all participants needing to stay online.
  • 2020/03, Hydra proposed Fast Isomorphic Channels.

(# 3.1.3 Technical Principles

The main process of the state channel is as follows:

  1. Alice and Bob deposit funds from their respective EOAs into the on-chain contract address, where these funds are locked in the contract until the channel is closed, at which point the balance is returned to the users; after both parties sign and confirm, the state channel between them is officially opened.

  2. Alice and Bob can theoretically conduct unlimited transactions off-chain through this channel, with participants communicating with each other via encrypted signed messages ) instead of communicating with the blockchain network ###. Both users 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, she 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 according to 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 Scaling

(# 3.1.4 Advantages and Disadvantages

Advantages:

  • Unlimited off-chain transactions can be achieved.
  • Fast transaction speed, almost instant confirmation
  • Low transaction costs
  • Good privacy, only on-chain when the channel is switched.

Disadvantages:

  • Need to lock funds
  • All participants need to stay online
  • Transactions can only be confirmed on-chain when the channel is closed.
  • The complexity of handling large multi-party transactions is high.
  • Status updates require signatures from all participants.

)# 3.1.5 Application

  1. Bitcoin Lightning Network

The Bitcoin Lightning Network is a micropayment channel on the Bitcoin network that uses off-chain micropayment channels and intermediaries to form a transaction network, addressing the scalability issues of the Bitcoin network. Theoretically, the Lightning Network can process one million transactions per second.

Main Timeline:

  • Draft of the white paper released in February 2015
  • The first mainnet version was released in March 2018.
  • In 2021, El Salvador adopted Bitcoin as legal tender and released a wallet based on the Lightning Network.
  • In 2022, multiple exchanges supported the Lightning Network.

The ecosystem mainly includes: the underlying BTC network, the core infrastructure ### Lightning Network solutions, nodes and liquidity services ###, and various payment and financial service applications on the upper layer.

  1. Ethereum Lightning Network

The Raiden Network is a micropayment channel built on Ethereum, very similar to the Lightning Network, aimed at enabling near-instant, low-cost, and scalable ERC20 token payments on Ethereum.

Main Timeline:

  • Established in 2017
  • The first mainnet client was released in May 2020.

Due to the slow development of technology, it has not been widely adopted at present.

  1. Celer Network

Celer Network is essentially a lightning network that adds an incentive layer with the ( token $CELR), capable of building fast, easy-to-use, low-cost, and secure high-frequency interactive blockchain Dapps, such as esports platforms, through off-chain scaling technology and incentive economic models.

(# 3.1.6 Application Comparison

The main differences between the Bitcoin Lightning Network, Ethereum Lightning Network, and Celer Network:

  • Underlying networks: based on Bitcoin, Ethereum, and multi-chain respectively
  • Function: The Lightning Network only supports payments, while the Thunder Network and Celer support more complex applications.
  • Level of Development: Lightning Network is the most mature, Thunder Network is developing slowly, Celer is in the middle.
BTC0.62%
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
  • 5
  • Share
Comment
0/400
AirdropHunter007vip
· 07-26 03:25
Here we go again talking about tps.
View OriginalReply0
ForkThisDAOvip
· 07-26 03:21
Hehe, now even scaling is being fooled by the Unholy Trinity.
View OriginalReply0
BrokenDAOvip
· 07-26 03:19
Another article discussing the Unholy Trinity. The more nodes there are, the more decentralized it becomes? Isn't it still the concentration of Computing Power in Mining...
View OriginalReply0
ValidatorVikingvip
· 07-26 03:07
battle-tested scaling has always been the final boss tbh
Reply0
TommyTeacher1vip
· 07-26 03:03
Let's prioritize TPS before discussing security.
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)