Pokereum : Decentralized Ethereum Poker High level Overview and Multi-Party Computation Library
Pokereum Overview
Pokereum is a Provably fair global and decentralized poker platform built on the ethereum blockchain. Pokereum uses a real time p2p RTC Telehash library to leverage high speed peer to peer interactions, collaborative cryptographic security and Ethereum blockchain with decentralized storage technology to provide trustless interaction between players and historical accuracy and provable fairness. Pokereum was the first Decentralized poker to be announced on the Ethereum Blockchain. As explained in the previous post, The project had begun development with a draft whitepaper dating back 2013 and was presented to some corporate outfits who are now building similar competing products. Nevertheless the resources to be provided are useful for any project or organization to build upon and for the progression of decentralized poker.
Today rather than pitch industry scandals and “well sounding solutions” to satiate the average poker enthusiast’s appetite, this little pie slice of a publication is giving full insight into one component layer of our internals: our Multi party computation library , without the security and encryption of our Shadow Poker Protocol. We will also be doing another publication on Shadow Poker (part 2); our brand of mental poker that represents the key to unlocking a properly working decentralized smart contract dependent poker system as first specified in this working white paper back in 2013. Any projects hoping to build decentralized poker can hopefully fine test/fine tune these libraries for integration and or improvement. Pokereum is a venture dapp governed by the SuperDAO organization.
Brief Technical Overviews
- Whitepaper
- Network & Routing
- Jury Observers
- Ethereum light client integration & Payment channels
- Pokereum RTC Multi-Party Computation
- Shadow Poker
The pokereum whitepaper is in a constant state of improvement as we iterate and conclude on the most viable specification. A final specification will be available by early 2017 to be published for any academic research. for now it resides in this public repository undergoing changes every now and again.
Network & Routing
Before we talk about actual p2p poker gameplay, it is important to note that the bootstrapping process is an important part of any decentralized network which involves seeding the network with initial nodes to provide signaling mechanisms to other node looking to join the network. The pokereum global network will eventually build upon the whisper protocol using “Topics” to broadcast player ip addresses and ports and also game sessions for global redundancy, this is already built into our implementation but not used. But For now the proof of concept uses adhoc server routers to signal and establish the Telehash connection links. Once the links are up there is no need for the router during gameplay. Sample router library is provided here: lib, if you are interested in testing out the system.
Jury Observers
An important part of of the pokereum network games, are jury observers using challenge-response mechanism for game state finality. A similar but changed scheme to POI (Proof of Importance) pioneered by the NEM platform, in this case amount and velocity of money spent counts as a reputational component towards the most trusted juror observers eligible for observation roles. An incentive network payment scheme to motivate honest juror participators while punishing fraudulent jurors through forfeited bonds is enough to enforce honest gameplay in the network.
Ethereum light client integration
The final layer of integration is by way of Ethereum light clients. From the recent developments with IPFS, we would have seamless access to the blockchain and decentralized storage wrapped up in a small light-weight electron desktop client. Also, naturally, payment and state channels moderated by SuperDAO autonomous smart contracts would ensure payments between players are unhindered and efficient.
Under The Hood : Pokereum RTC Multi-Party Computation
The above was supposed to be a 3-player demo, but it was impossible due to network connections. As you can see its pretty surreal and fun sending simple messaging and multi-computed, synchronized game state update messaging. There is no private encryption security included with the public library as provided below :
once links are up (links represents a state of peer to peer connectivity), hash names (hexadecimal alphanumeric) endpoints are used to coordinate all messaging between nodes. You can give it a try once you set up a router available here :
here are the steps to replicate the fun you see in the video with two or more players
Run
node example/index.js
Commands
- name (name) — change your name
- game (name)
- join (game ID) — join game with ID. You can use “last” instead of game ID to join the last broadcast game.
- start — start the game, if you’re host
- msg (message) — send chat message
- sit (chips amount) — sits you on the table with the chips amount
- call
- check
- fold
- bet (amount)
- allin
Mental poker VS Shadow Poker Note
It is important to note that order-independent commutative encryption or 3 pass protocol as some are touting as a snake oils solution has been shown to be an historically non-viable solution to a real time, multi-player game strategy suitable for the marketplace. If someone tries to sell you that as a viable market solution, run for the hills! It is however a nice feel good experiment in collaborative security test. Part of our shadow poker protocol is one in which card permutations are pre-computed. Yes, thats right, precomputed. The trick is you need a very large number of permutations and clever collaborative random selection, masking and unmasking schemes, with thresholds and more, all without outrageous gas cost while using smart contracts, oh my! More on that later :)
Pokereum Roadmap
Whats next
- Superneum (Sup) crowdfunding : http://crowdfunding.superdao.io
- More development on SuperDAO & Pokereum
- Shadow poker specification and live demo!
- Downloadable clients :)