State channels refer to the process in which users transact with one another directly outside of the blockchain, or ‘off-chain,’ and greatly minimize their use of ‘on-chain’ or Ethereum Mainnet operations. Channel peers can conduct an arbitrary number of off-chain transactions while only submitting two on-chain transactions to open and close the channel. This allows for extremely high transaction throughput and results in lower costs for users.
Here is basically how state channels work:
- Users lock up a portion of the state by sending money to a multisignature contract that has the ability to accept Ether and payout all parties who have sent it Ether.
- Users sign transactions and send them to one another, each one making a copy of the signature for later reference.
- Each transaction contains a nonce so the smart contract can know the chronological order of transactions.
- Once both parties are done, they close the state by submitting a transaction to the Ethereum blockchain.
- After the state is updated and unlocked, the smart contract sends each party their remaining Ether balance.
Why is State Channel Important?
Scaling is arguably the biggest obstacle that blockchains face when it comes to achieving mainstream adoption. While some applications can thrive today, most are still too slow and expensive for regular users.
Scaling is one of the biggest obstacles that hinder mass/mainstream adoption.
State channels increase the throughput- transaction per second, of public blockchains because they decrease the computational load that nodes have to expend when processing and storing transactions. This will make it easier to run a node, which makes the role of validating the miners’ work more decentralized. Likewise, State Channels reduce the costs required to use the Ethereum network. Instead of paying fees for each transaction, users only have to pay for gas when they open and close a channel.
State channels also help preserve user privacy. Transactions within a channel are only known by the participants in the channel. This is in contrast to transacting on the Ethereum blockchain where every transaction is recorded in a publicly auditable ledger.
In addition, transactions within state channels get instant finality, which is another challenge facing blockchains. Users don’t have to wait for each transaction to confirm onto the blockchain because each signed transaction abides by the network rules. This makes the user experience seamless.
Leave a Reply