Counterfactual: Generalized State Channels

Abstract. State channels are an important technique for reducing fees for blockchain users. Within their scope of applicability, they allow users to transact with each other without paying blockchain transaction fees and with instant finality, and are the only technique that securely realises the latter property. We describe generalized state channels, a construction that allows users to install new functionality in an existing channel without touching the blockchain, using counterfactual instantiation of contracts within a channel. We present an object-oriented approach built on top of ethereum that encapsulates functionality and state in counterfactually instantiated contracts, providing numerous privacy, efficiency and security benefits over a monolithic approach, and describe a new object-oriented metachannel approach to building state channel networks. We analyze the unique security assumptions of channels and describe third-party services that channel users can benefit from using.

For a more approachable introduction, read our post here. For a broad survey on Layer 2 solutions, read Josh Stark's article: Making Sense of Ethereum's Layer 2 Scaling Solutions.

What is general about "generalized state channels"?

Generalized state channels move all of the on-chain stateful components for blockchain applications off-chain. Rather than require each application developer to build an entire state channel architecture from scratch, a generalized state channel generalized framework is one where state is deposited once and then be used by any application or set of applications afterwards.

How are state channels different from Plasma?

State channels function under the assumption of unanimous consent amongst parties involved whereas Plasma relies on merkle proofs submitted to the main chain by the Plasma validator(s). As a result, changes made in a state channel achieve finality as soon as messages are signed and do not need to wait for confirmations in order to consider transactions completed and secure (state channels are the only stateful blockchain construction with this property). By contrast Plasma users must still wait for confirmations in order to consider their transactions completed and secure. In Plasma, the validator set is usually assumed to be different than and smaller than the participant set whereas in state channels they are the same set. Additionally, Plasma requires main chain transactions in order to publish the merkle root of the off-chain state periodicaly, whereas state channels do not necessarily assume that any on-chain operations will ever be necessary.