Off-chain Scaling Technology Depth Analysis: The Principles and Applications of State Channels and Sidechains

Off-chain Scalability Depth Analysis

1. The Necessity of Scalability

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 years, people have been exploring how to improve the throughput and transaction speed of blockchain while ensuring decentralization and security, which is to solve the scalability issue, and this is one of the hot topics in the current development of blockchain.

The decentralization, security, and scalability of blockchain can be defined as:

  • Decentralization: Anyone can become a node and participate in the blockchain system. The more nodes there are, the higher the degree of decentralization, ensuring that the network is not controlled by a few centralized participants.

  • Security: The higher the cost of gaining control over the blockchain system, the higher the security, and the chain can resist attacks from a larger proportion of participants.

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

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

The first major hard fork of the Bitcoin network stemmed from scalability issues. As the number of users and transaction volume increased, the Bitcoin network with a 1MB block size limit began to face congestion. Since 2015, there has been a division in the Bitcoin community regarding scalability, with one side advocating for larger blocks and the other side supporting the use of Segregated Witness to optimize the main chain structure. On August 1, 2017, the side in favor of scalability independently developed an 8MB blockchain, leading to the first major hard fork of Bitcoin and the birth of the new cryptocurrency BCH.

The Ethereum network also chooses to sacrifice some scalability to ensure security and decentralization, limiting transaction volume through a gas fee cap. From the 2017 CryptoKitties to the rise of DeFi, GameFi, and NFTs, the market's demand for throughput has been increasing, but Ethereum can only process 15-45 transactions per second, leading to rising transaction costs and longer settlement times. Most DApps struggle to bear operational costs, making the entire network slow and expensive, urgently needing a solution to the scaling problem. The ideal scaling solution is to increase transaction speed and throughput as much as possible without sacrificing decentralization and security.

2. Types of Scalability Solutions

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

2.1 On-chain Scaling

Core concept: A solution that achieves scalability by changing a layer of the main network protocol, with the current main solution being sharding.

There are various solutions for on-chain scalability, here are two briefly listed:

  • Option one is to expand the block space and increase the number of transactions packaged in each block, but this will raise the requirements for high-performance node devices and reduce the level of "decentralization".

  • Option two is sharding, which divides the blockchain ledger into several parts, with different shards responsible for different bookkeeping, allowing parallel computation to 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, but it means that the total computing power of the network is distributed, which may reduce the "security" of the entire network.

Changing a layer of the mainnet protocol may lead to unforeseen negative impacts; any slight security vulnerabilities at the underlying layer can seriously threaten the overall network security, and the network may be forced to fork or interrupt for repair and upgrades.

2.2 off-chain scaling

Core concept: an expansion solution that does not change the existing Layer 1 mainnet protocol.

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

Layer2:

  • State Channels
  • Plasma
  • Rollups
    • Optimistic Rollups
    • ZK Rollups

Others:

  • Sidechains
  • Validium

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

3. off-chain scaling solutions

3.1 State Channels

3.1.1 Summary

State channels stipulate that users only need to interact with the mainnet when opening, closing, or resolving disputes in the channel, allowing interactions between users to be conducted off-chain to reduce transaction time and costs, enabling unlimited transaction counts.

State channels are simple P2P protocols suitable for "turn-based applications" such as two-player chess. Each channel is managed by a multi-signature smart contract on the mainnet, which controls channel assets, verifies state updates, and arbitrates disputes ( based on fraud proofs with signatures and timestamps ). After participants deploy the contract, they deposit funds and lock them in; the channel officially opens after both parties sign to confirm. The channel allows unlimited free off-chain transactions ( as long as the net value does not exceed the total amount deposited ). Participants take turns sending state updates and waiting for the other party to sign and confirm. Normally, state updates are not uploaded to the mainnet and rely on mainnet confirmation only in case of disputes or when closing the channel. When closing the channel, either party can make a request on the mainnet; if all signatures are approved, it is executed immediately; otherwise, it must wait for the "challenge period" to end.

State channels can significantly reduce the computing load on the mainnet, increase transaction speed, and lower transaction costs.

Ten Thousand Character Depth Research Report: Comprehensive Analysis of Off-Chain Expansion

3.1.2 Timeline

  • 2015/02: Joseph Poon and Thaddeus Dryja released the draft of the Lightning Network white paper.

  • 2015/11: Jeff Coleman first systematically summarized the concept of State Channel, proposing that the Bitcoin Payment Channel is a sub-case of State Channel.

  • 2016/01: Joseph Poon and Thaddeus Dryja officially published the Bitcoin Lightning Network white paper, proposing the Payment Channel scalability solution.

  • 2017/11: The first design specification for State Channel based on Payment Channel was proposed by Sprites.

  • 2018/06: Counterfactual proposed a detailed design for Generalized State Channels, the first fully relevant design.

  • 2018/10: Proposed the concepts of State Channel Networks and Virtual Channels.

  • 2019/02: State channels expanded to N-Party Channels, Nitro is the first protocol based on this idea.

  • 2019/10: Pisa expanded the concept of Watchtowers to address the issue of participants needing to be online continuously.

  • 2020/03: Hydra proposed Fast Isomorphic Channels.

3.1.3 Technical Principles

Traditional on-chain workflow: Users change the state of smart contracts by sending transactions to the chain, but this brings time and cost issues.

State Channel Workflow:

  1. Users deposit funds from EOA to the on-chain contract, locking them until the channel is closed.
  2. Users can conduct unlimited transactions off-chain through encrypted signed message communication.
  3. When closing the channel, submit the final state to the contract. If the other party signs to approve, execute immediately; otherwise, wait for the challenge period.

In a pessimistic scenario, if one party does not respond, the other party may challenge the contract by submitting the last valid state to the contract, which allows the other party to respond within a certain period. If there is no response, the contract automatically closes the channel and returns the funds.

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

3.1.4 Advantages and Disadvantages

Advantages:

  • Instant confirmation, fast transactions
  • Low Fees
  • Privacy
  • High Throughput

Disadvantages:

  • Continuous online monitoring is required.
  • Funds need to be locked
  • Not suitable for low-frequency trading
  • The channel capacity is limited
  • Universal smart contracts are not supported.

3.1.5 Application

Bitcoin Lightning Network:

  • It is a micropayment channel on the Bitcoin network
  • Construct a transaction network through off-chain micropayment channels and intermediaries to solve the scalability issue.
  • Follow the "Deposit → Lightning Network Transaction → Refund/Settlement" process
  • Theoretically, it can handle millions of transactions per second.
  • By the end of 2021, the TVL was approximately 40 million USD, with around 100,000 users.
  • In November 2022, there were 76,236 payment channels, 5049 BTC funds ( $81.8M )

Ethereum Lightning Network:

  • Micro payment channels based on Ethereum, similar to the Lightning Network
  • The goal is to achieve near-instant, low-cost, and scalable ERC20 token payments.
  • Established in 2017, raised 30 million USD in ICO in October 2017.
  • The first Light Client was launched in May 2020
  • Currently not widely adopted, reasons include high entry barriers and the emergence of more advanced scalability technologies.
  • The team is transforming it to run on the Ethereum Layer 2 Rollup network.

Celer Network:

  • The essence is to increase the incentive layer of the Lightning Network
  • Build fast, easy-to-use, low-cost, and secure high-frequency interactive DApps through off-chain expansion technology and incentive economic models.
  • Suitable for high-frequency interactive applications such as e-sports platforms
  • Use OAT( Off-chain Address Translator ) to uniquely map off-chain addresses to on-chain smart contracts.
  • Composed of three layers: cChannel, cRoute, and cOS
  • Founded in 2018, $CELR token was issued in March 2019.
  • Currently launched DeFi protocol Layer2.finance, information cross-chain protocol Celer IM, and asset cross-chain bridge cBridge.

3.1.6 Application Comparison

Bitcoin Lightning Network:

  • Used for BTC payments
  • Bi-directional Payment Channel
  • Large trading volume
  • The ecological development is relatively good.

Ethereum Lightning Network:

  • Used for ETH and ERC20 payments
  • Bi-directional Payment Channel
  • Small trading volume
  • Ecological development is slow

Celer Network:

  • Supports multiple assets
  • Generalized State Channel
  • Medium trading volume
  • The ecosystem is developing towards cross-chain direction.

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

3.2 Sidechains

3.2.1 Summary

The concept of sidechains was first proposed in the Bitcoin developer chatroom in 2012, and the first related article was published in 2014. Sidechains are a form of blockchain that emerged to accelerate Bitcoin transactions, allowing for more complex contracts or improved consensus mechanisms. When the results of sidechain transactions are eventually sent back to the main chain, they are recorded on the validator's side. This model is infrastructure that is attached to the main chain and helps to solve problems.

3.2.2 Timeline

  • 2012/01: The concept of Bitcoin sidechains was proposed in chat rooms.
  • 2014/10: Publication of Bitcoin sidechain papers: Symmetric Pegged and Asymmetric Pegged
  • 2017/04: The POA Network sidechain testnet based on Ethereum PoA consensus goes live.
  • 2017/10: Matic Network launched
  • 2017/12: POA Network mainnet launched
  • 2018/01: Skales testnet launched
  • 2018/10: xDai Chain testnet launched
  • 2020/06: Skale mainnet launch
  • 2020/06: Ethereum sidechain Matic PoS Chain mainnet launch
  • 2021/02:Matic Network was renamed to Polygon Network
  • 2021/02: Axie Infinity game sidechain Ronin mainnet operation
  • 2021/12: xDai Chain merged with Gnosis Dao to form Gnosis Chain
  • 2022/03: POA Network merged into Gnosis Chain

3.2.3 Technical Principles

Sidechains use two methods to communicate with the main chain: bidirectional anchoring ( Symmetric Pegged ) and uncoordinated anchoring ( Asymmetric Pegged ).

Symmetric Pegged:

  • The main sidechain validators record each other's current status in real time ( block header information )
  • Use bi-directional SPV technology to transmit information
  • SPV-Locked Output is generated when the main chain Token is sent to the side chain.
  • Sidechain validators unlock using SPV proof
  • New minted assets can be used on the sidechain after waiting for the confirmation period and contest period.

Asymmetric Pegged:

  • Sidechain validators monitor mainchain activities in real time
  • When transferring from the main chain to the side chain, the side chain actively records (forward transaction)
  • Introduce the Certifiers mechanism when transferring from sidechain to mainchain
  • Certifiers record contract ID, validator ID, transfer list, and other information.
  • Certifiers ensure security through staking and signing.

Currently, most sidechains use the PoA mechanism or Relayers as an intermediary layer to confirm the state of the main chain blocks.

Sidechain Mechanism Summary:

  • Main chain → Side chain: The main chain locks assets, and the side chain generates wrapped assets.
  • Sidechain → Mainchain: Sidechain destroys wrapped asset, Mainchain unlocks asset.

The security of sidechain assets depends on the security of the sidechain, namely the sidechain consensus mechanism.

![Ten Thousand Words Depth Research Report: Comprehensive Analysis of off-chain Expansion](

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
  • 9
  • Share
Comment
0/400
RugDocScientistvip
· 07-09 09:14
To be honest, I really can't handle it; the triangular dilemma is too difficult to bear.
View OriginalReply0
TokenUnlockervip
· 07-07 19:59
Three rights cannot be held simultaneously? Who said that?
View OriginalReply0
SighingCashiervip
· 07-07 12:48
The triangle impossibility is already a classic old problem.
View OriginalReply0
MetaMaximalistvip
· 07-06 09:46
another naive take on the scalability trilemma... sigh
Reply0
CryptoFortuneTellervip
· 07-06 09:42
Again, the Unholy Trinity is an old problem.
View OriginalReply0
rekt_but_not_brokevip
· 07-06 09:33
Isn't this the blockchain triangle inequality? Can we come up with something new?
View OriginalReply0
NewPumpamentalsvip
· 07-06 09:27
This Unholy Trinity is really annoying.
View OriginalReply0
SolidityNewbievip
· 07-06 09:25
Unholy Trinity... it's really hard to deal with.
View OriginalReply0
SybilAttackVictimvip
· 07-06 09:18
The triangle problem is going in circles again.
View OriginalReply0
View More
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)