
Ethereum Layer 2 Scaling Solution: State Channels
TechFlow Selected TechFlow Selected

Ethereum Layer 2 Scaling Solution: State Channels
The channel area is divided into payment channels and state channels, where state channels are derived from payment channels.
Author: Zhang Le Hui
1. What is a channel, and why do we need channels?
1.1 Why do we need channels?
As blockchain networks grow in user count and transaction volume, they often face congestion, slow transaction speeds, and high fees. Therefore, scalability must be improved—and channels are one of the scaling solutions.
1.2 What is a channel?
-
First: A channel is a solution to blockchain scalability issues—a peer-to-peer (p2p) network or protocol that enables two parties to conduct multiple transactions off-chain, then submit only the final result on-chain for signature verification and settlement. Channels are categorized into payment channels and state channels, with state channels being an evolution of payment channels.
-
Second: Channels reduce direct interaction with the main chain through off-chain transactions, alleviating main chain load and lowering user costs.
-
Third: Each channel is managed by a multisig smart contract on the main chain. To open a channel, both parties must deploy a contract on-chain and deposit a certain amount of assets.
-
Fourth: Upon channel establishment, both parties create an initial state recording their starting balances (e.g., Alice 5 ETH, Bob 5 ETH). Both sign this initial state and keep a copy locally—possibly stored in their local databases or secure storage.
-
Fifth: When closing the channel, both parties must agree on the final state and generate signed confirmation. This final state is then submitted to the blockchain, where signatures are verified and settlements executed, officially closing the channel.
2. How state channels work: principles and process
2.1 Creating and deploying a multisig contract to establish a channel
2.1.1 Deploying the multisig contract
A multisig contract must be deployed on the L1 main chain to manage the channel. This contract requires both parties to deposit funds, which remain locked until the channel is closed and settled, at which point funds are released.
2.1.2 Depositing funds
After the contract is deployed (or if already deployed), both transacting parties must each deposit a certain amount of funds, which will then be locked within this multisig contract.
2.2 Off-chain transactions
2.2.1 Generating the initial state
When the channel is established, both parties create an initial state recording their starting balances (e.g., Alice 5 ETH, Bob 5 ETH). They both sign this initial state and retain a signed copy locally—stored in their respective local databases or secure storage.

image.png
2.2.2 Conducting a transaction
Alice pays Bob 1 ETH. After the transaction, the new balance state becomes: Alice 4 ETH, Bob 6 ETH. Both parties sign to confirm this updated balance state.

image.png
2.2.3 Multiple transactions
The two parties can continue conducting multiple transactions. After each transaction, the balance state is updated and signed. For example, after Bob pays Alice 2 ETH, the new balance state becomes: Alice 6 ETH, Bob 4 ETH. These transaction records are stored locally by Alice and Bob and are not immediately submitted to the blockchain.

image.png
2.3 Closing the channel
2.3.1 Preparing to close the channel
2.3.1.1 Confirming the final state
Alice and Bob must verify the latest transaction state and ensure mutual agreement. This final state records the most recent balance distribution (e.g., Alice 6 ETH, Bob 4 ETH).
2.3.1.2 Generating final state signatures
Both parties sign the final state, producing a message containing the final balances and their respective signatures.

image.png
2.3.2 Submitting the final state to the blockchain
Either Alice or Bob can submit the final state to the blockchain. The submission includes the final balance distribution and both parties’ signatures.
2.3.3 Verification and settlement
2.3.3.1 Signature verification
On-chain verification checks the validity of the submitted signatures to ensure the final state was mutually agreed upon. The validation logic typically involves verifying signature authenticity and ensuring they match the final state.
2.3.3.2 Balance settlement
Once verified, the smart contract releases funds from the multisig address according to the final balance distribution—e.g., Alice receives 6 ETH, Bob receives 4 ETH.
2.3.3.3 Marking the channel as closed
The smart contract marks the channel status as closed, preventing any further state submissions.
3. Why are channels designed using multisig contracts?
Channels use multisig contracts primarily to ensure the security of both parties' funds and to require mutual consent for fund transfers. This design adds an extra layer of security, preventing either party from unilaterally operating the funds without the other's approval. Below are key reasons why channel contracts are built as multisig contracts:
3.1 Ensuring fund security
In a multisig contract, fund transfers require authorization via multiple signatures (typically from both parties). This prevents unilateral fund movement and enhances overall fund security.
3.2 Preventing fraud
Multisig contracts effectively prevent fraudulent actions by either party. Since any fund transfer requires both parties’ signatures, all transactions are guaranteed to be mutually agreed upon.
3.3 Enabling off-chain transaction signing mechanisms
Multisig contracts allow multiple off-chain transactions, with each update confirmed via digital signatures. Only the final agreed-upon state is submitted on-chain for settlement. This mechanism relies on mutual signing to ensure every step is transparent and acknowledged.
3.4 Ensuring correct channel closure
During channel closure, the multisig contract ensures that final state submission and fund settlement require mutual consent. This prevents either party from unilaterally closing the channel and claiming an unfair share of funds.
4. Comparison of state channel advantages and disadvantages
4.1 Advantages
First: Low transaction costs and improved efficiency. Second: Data remains off-chain, offering strong privacy. Third: Includes a challenge period, providing robust security.
4.2 Disadvantages
First: The existence of a challenge period leads to slow withdrawal speeds. Second: Smart contracts are not supported off-chain. Third: Requires both parties to remain online—participants must stay connected to promptly receive and process state updates and participate in dispute resolution. If one party attempts to maliciously close the channel or submit an incorrect state, the other online party can intervene in time via on-chain dispute resolution mechanisms. Fourth: Limited participants—channels typically involve only two parties and cannot scale to many participants. Fifth: Not suitable for large-scale networks, with poor scalability.
Join TechFlow official community to stay tuned
Telegram:https://t.me/TechFlowDaily
X (Twitter):https://x.com/TechFlowPost
X (Twitter) EN:https://x.com/BlockFlow_News














