Velcron: Introducing multi-party state-channels.

Decentralization is great; decentralized consensus though is slow.

State-channels have been proposed as a solution to the latencies and expenses which persist in achieving decentralized consensus, by side-channeling messages signed by robust sources of identifications.

They predicate enforcing a initial state, and operate through deferring actual state deltas upon the opening and closing of a single communication channel.

A users authorization for a state update is latched onto messages by binding a chain of transaction locks; such as time/hash locks welded by an asymmetric key pair honed by a wallet in a blockchain for example.

The pros?

If we had 10 messages to send between two parties iterating through state updates, we only require 2 expensive transactions (the opening and closing of a channel), with the rest of the transactions being deferred state deltas that may perform in real-time and practically for free.

On the Ethereum blockchain, opening/closing a state-channel would require either party to pay for transaction fees, with the rest of the state deltas being propagated off-chain.

Now, the cons?

One thing to note is that they have been advertised as a practical ends-meet-all solution to a wide plethora of situations requiring real-time decentralized communication protocols.

Little has been discussed about how present solutions or proposals scale in scenarios which deal with multiple parties though.

0x, Raiden Network, Kyber, etc; they deal with state-channels opened, closed, and utilized only between two parties. AKA 1-to-1 communication.

Most of these solutions even require knowing the other party before opening/closing said state channel. What if you wanted to leave a state-channel open which allows for any party to participate within?

What if you wanted to have1-to-N communication?

For the likes of Velcron which is a cryptocurrency trading platform I have been working on, speed is crucial, trades need to be performed on multiple parties, and security needs to be practically impenetrable.

Here’s my proposal to extending state-channel communication. Let me know your opinions, or if you have any situations you would like for me to consider about said proposed protocol.

Multi-Party State Channels

We define a state-channel with three primary operations: open, close and update.

Updates are verified through a bounded set of locks (of size at most 1) which are propagated off of a side channel. The close operation enforces an application of these deltas onto a single ground-truth source (the blockchain).

Let’s define our state S with our set of locks bounded to each state delta as a set of hash locks amongst N parties.

To enable for a single replicated concurrent state to be updated by N parties, we model our state as a semi-lattice, with deltas to the state limited to being partially ordered, commutative operations.

Over an upper-bounded time window in which these operations are distributed and applied, there will be strong eventual consistency of state amongst these multiple parties. These monotonic operation-based state deltas are what in academic literature we’d define as CmRDT’s (commutative conflict-free replicated data types).

CmRDT’s applied onto a distributed state.

A peer joining, communicating, or signing off of a state-channel can be defined as a deferrable state delta operation on a semi-lattice structured state.

CmRDT’s are popular in creating real-time collaborative systems such as Google Docs or collaborative art tools, etc. without any sort of centralized state source.

Said hash locks on the other hand would then be passed along all parties to determine if a state operation was verified from an authenticated channel participant.

As a result, we now have real-time side-channeled operations, with persistent security coming from some ground-truth identification source amongst N parties.

Game-theoretic Awareness

Representing state-channels as a message-passing game.

Extending state-channels to N parties requires an in-depth game-theoretic analysis to ensure that the game is trustless despite rogue players being present in such a system.

We can model this scenario to a finite dynamic N-player game with potentially rogue players (potentially teaming/working with one another) to cheat the system for an unfair economic gain.

A similar scenario to said game would be the Fishermen’s Dilemma, where a majority of rogue players may attempt to work against a single player (co-operative) who has greater economic gain at a certain iteration of said (non-cooperative) game.

An alternative scenario would be where a majority of rogue players may attempt to work against a group of players with lower economic gain to greedily hold all economic resources at a certain iteration of said game.

These scenarios may be represented as edge cases as a result of players attempting to reach a gain through playing a Best-Response game.

We deduce the termination of this game to not converge towards Nash equilibrium financially, but rather for state Nash equilibrium upon said parties. Note that this is possible despite the message-passing of state deltas being potentially delayed due to the asynchronous dynamics of said game.

Nash Equilibrium states that the optimal solution for any one player in a N-player non-cooperative game is obtained only through one methodology/strategy despite understanding all possible actions any other player in the game may perform.

By keeping track of the number of deltas applied onto the decentralized state of said games, inherent latency is not of concern either when it comes to any player deciding to exit the game. Those who receive the last applied and verified state delta may simply apply it to the ground-truth source if all other players have already exited said game.

For each player of N players in said game, if all but 1 player sequentially leaves the game cooperatively to ignore the state delta of the last player, said last player may simply reach state equilibrium simply by submitting it to the ground-truth source.

Citation: Pilotto, Concetta, and K. Mani Chandy. “On Equilibria of Distributed Message-Passing Games.”

Coleman, Jeff. “State Channels — an explanation.” Jeff Coleman, Jeff Coleman, 18 Nov. 2015, www.jeffcoleman.ca/state-channels/.

Conclusion

As the following edge cases do not promote any financial gain despite the existence of rogue players in this dynamic game, and the game may safely terminate with players joining/leaving through message-passed deltas, there appears to be no security holes from what I’ve denoted so far.

For Velcron, I implemented everything denoted above as proof of concept for our state-channel protocol for our cryptocurrency trading platform. If you find the protocol secure, then definitely sign up for our private beta white-list available at velcron.io. I’ll be publishing a paper for peer review soon formally proving how CRDT’s as a form of message passing and state propagation allows for a fair state-channel modeled as a dynamic finite N-player game.

A quick peek of our trading UI so far.

Swift trades; impenetrable security. We hope to give a far more feasible solution to trading, to make trades something not a fault of poor UX or systems interfacing/development.

In other words, we’ll be looking to get Velcron out as the world’s fastest decentralized cryptocurrency exchange :).

Got any questions or comments? Just let me know.