Bitcoin Forum
February 26, 2018, 02:03:00 AM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
   Home   Help Search Donate Login Register  
Pages: [1]
Author Topic: Distributed/Decentralized Poker Proposal  (Read 4934 times)
Full Member
Offline Offline

Activity: 210
Merit: 100

In Crypto we Trust.

View Profile
December 08, 2013, 09:54:42 PM

I recently read about people wanting to implement a decentralized poker system using bitcoin-esque techniques:

here and here.

However, these topics mostly talked about 'if' such an idea would be possible. I thought about it a little and came up with a concept that resolves most of their problems.

This is still a rough draft, and might contain some grammar mistakes (or even huge logical flaws) but I want to hear what you think about it, and how we might be able to resolve the few issues that are still left to solve.

Distributed/Decentralized Poker Proposal:

(Use Texas Hold'em rules for the basic implementation, since it is the most played variant of poker today.)

Requirements for a good working multi-table decentralized poker system with payments:
1.The basic game needs to be working decentralized:
   -Players sit down on table (possibly paying a small sum of money to get in the game: the blind)
   -Shuffling the deck
   -Giving each player 2 cards without the other players knowing them
   -Drawing and showing 3 public cards to everyone. (flop)
   -Betting opportunity.
   -Draw and show the 4th public card (turn)
   -Betting opportunity.
   -Draw and show the 5th public card (river)
   -Winner gets declared, gets all money bet.
   -Players leave the table.
2.Showing what tables are waiting for more players should work decentralized
3.Betting money (e.g. bitcoin) and receiving the earnings should be decentralized.
4.Prevent multi-account play (a person playing on multiple seats at a table at once), or at least make this difficult.

How can we do this?
A. Basic Poker:
 There is a great cryptographic method called 'Mental Poker' which enables a set of cards (or other set of values) to be shuffled by multiple people without using a trusted third-party.
   -Alice starts out with an unshuffled deck.
   -Alice picks an encryption key A, and encrypts all cards using that key.
   -Alice shuffles the deck.
   -Alice passes the shuffled deck to Bob.
   -Bob does not know what order the cards are in, since he doesn't know A (and thus doesn't know what values represent what cards in the new stack).
   -Bob picks an encryption key B, and encrypts all cards using that key.
   -Bob shuffles the deck.
   -Bob gives the deck back to Alice.
   -Alice now has no idea either about the values/positions of the cards.
   -Alice uses her key A to decrypt all cards. (though she still doesn't know the values since Bob's key B is still in place)
   -Alice encrypts all cards using a special key for each card.
   -Alice passes the deck to Bob.
   -Bob decrypts all cards. (though he still doesn't know the values since Alice's many keys are in place).
   -Bob encrypts all cards using a special key for each card.
The deck is now shuffled: All players can see the stack, but they do not know what value is what card, since all players hold a key needed to decrypt it.
If the protocol decides that a certain player should be able to see a certain card, all players give that player their keys for that card.
Now only this player has all keys needed to look at the card.

This can be used to implement most of the poker scheme.

B. The Blockchain:
To enable multiple games to be played at the same time, enable players to be able to look for games with open seats, to keep track of payments, and to increase trust in the system, a Blockchain is used.
Transactions in this Blockchain are events happening in a game:
   -Game created
   -Player joins/pays ante.
   -Cards shuffled & dealt.
   -Player bets on flop or folds.
   -Next payer bets on flop or folds.
   -Turn dealt.
   -Player bets on turn or folds.
   -Next player bets on turn or folds.
   -River dealt, rest of deck now opened to be visible for everyone. Winner gets declared, gets winnings.
These transactions all have:
   -An ID/address to identify the game they belong to.
   -A signature(public key) from all players (still) in the game.
   -A signature(public key) from the player signing the current transaction.
   Game joinging transactions have on top of this:
      -game-specific public key to be used when dealing cards to this player. (so only he can see the cards dealt to him).
   Betting transactions have on top of this:
      -Bitcoin address to send data to
      -Transaction ID from the action to cross-reference with the bitcoin-blockchain.
   Shuffling transactions have on top of this:
      -A sequence of values representing the shuffled deck.
   Card-dealing transactions have on top of this:
      -The position of the card to be dealt.
      -The key used by the player to encrypt the card at this position, encrypted with the recieving player's (game-specific) public key (so only he can read it).

-Betting and Shuffling transactions are only made by the player doing the action. The other players can confirm these transactions, as can the rest of the network.
-Card-dealing transactions are made by all players simultaneously. They should be only confirmed(put in a block) by the network after a copy of this transaction with each of the player's signatures is found.   

Propagation time should be fast. As clients will primarily talk with eachother using the blockchain, new transactions should known throughout the whole network within a minute.

As the blockchain will quickly grow in size, and as games are mostly unrelated, most home clients won't need to store the whole history of it, if they don't want to.
However, some larger nodes should keep it whole. This way, players can cross-reference other players to see how they played before. (see Trust).

3. Trust
By using a Blockchain where all events from all games will be stored, it is possible to check what games a player played before.
This way, a player can decide whether he wants to join a table, considering for instance:
-How many games did a player play before? (if none, this is a new account, thus low trust: do not bet high.)
-How often did the players at the current table play together before?
-How much did these players bet in the past?

Someone doing multi-account play will play many games with the same players (his puppets).
To prevent this from being visible, he will create new accounts regularly.
However, if checking how many games an account has played is also possible, one can take precautions against these kinds of players, by for instance only betting low when around new players.

4. Issues
This system still has issues that need to be resolved:
-What might be the incentive of mining, of keeping the Blockchain secure and up-to-date?
-Bitcoin might be too slow for bets. We might need to use another (dedicated or not?) coin and exchange these for bitcoins like pokerchips get exchanged in a casino.
-Payment. We could implement M-of-N addresses so players get access to the funds when all(or a specified part of) the players agree to give them the money. Of course, when players disconnect from the game while it is being played, nobody will be able to get to the jackpot.

To ensure that you know that I really wrote this, this message is signed using my donation bitcoin address (1Cg76Ft1Juhorwxs1HV8ER7D3rpvPpq9yF).
(this is v. 1.0 of this message) ♢ Refreshing ♥ Fair ♧ Bitcoin Casino

WMCode ~ Web Development ~ Design
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
Full Member
Offline Offline

Activity: 210
Merit: 100

In Crypto we Trust.

View Profile
December 08, 2013, 09:55:44 PM

Signature from the first post(v1.0): IFdHS27k/jllnXsTUXPoaPhduavdXSpReRot0TtchKy/cvqLjpRvjU8679OBpa8WcpoGUTHsx1zUX6I3DRX3PRA= ♢ Refreshing ♥ Fair ♧ Bitcoin Casino

WMCode ~ Web Development ~ Design
Offline Offline

Activity: 27
Merit: 0

View Profile WWW
December 09, 2013, 10:03:52 AM

The generic term is Secure Multiparty Computation (usually abbrevated as MPC). I've been thinking of doing all kinds of round-based games this way together with Bitcoin and optionally with anonymizing networks like I2P. All kinds of cools things could be done this way, including reputation tracking and setting up tournaments. If done right it could practically be cheat proof. (It would however be harder to verify that somebody with 1000 wins haven't been playing against his own 1000 fake accounts.)
Hero Member
Offline Offline

Activity: 714
Merit: 500

View Profile
December 09, 2013, 11:06:42 AM

You may already done so, but you should get in touch with Sergio Demian Lerner (@SDLerner) who has created a Mental Poker Framework ( He also has patents covering this.

It all looks very interesting but in order to do the shuffling etc it is still very performance intensive - i.e. minutes not seconds, but once a game has started the shuffling can be pre-computed for the next hand.

I'd love to see this implemented!
Offline Offline

Activity: 3
Merit: 0

View Profile
December 09, 2013, 06:29:40 PM

I like this idea.. any way to prevent collusion is what's going to take the cake
Offline Offline

Activity: 100
Merit: 10

View Profile
May 20, 2014, 11:50:31 PM

I think using blockchain technology to manage the game does not work.

Blockchains are too slow. I don't think it is needed to write the actions of a game into a blockchain. Instead players could just communicate with each other.

I.e. P1 shuffels the deck and passes it to the next guy P2. Then tells everyone that he passed the deck to next player. P2 confirms to all that he received the new deck and so on.

There is no need to write these things down and wait for confirmations this would slow down the game too much. Instead players can just communicate. the hardes part is the shuffle and dealing of cards. Once that is done all the other players can simple tell others their decisions.

At the end of the game the results could be stored in a blockchain to be able to validate results, but even that should not be needed if we are in a trustless environment.
Offline Offline

Activity: 8
Merit: 0

View Profile
May 21, 2014, 02:05:25 AM

I have trouble understanding how decentralized poker would work because of collusion. You need a trusted party that overlooks the games.
Heads up poker is the only option, I think.
Offline Offline

Activity: 10
Merit: 0

View Profile
July 23, 2014, 09:48:05 AM

Regarding the decentralized poker implementation, there do have research paper showing that it works. However, to make it practical/ fast enough, it might not be that easy.

As for collusion, if you can pick a trusted host, you probably can pick the honest players.

There is a lot to resolve but with more and more people working on it, surely it will get better.
Hero Member
Offline Offline

Activity: 714
Merit: 500

View Profile
March 22, 2017, 10:17:47 AM

Interesting thread! I love poker and am curious about such decentralized implementation of the game.

Sr. Member
Offline Offline

Activity: 406
Merit: 252

View Profile WWW
March 22, 2017, 08:54:54 PM

I have trouble understanding how decentralized poker would work because of collusion. You need a trusted party that overlooks the games.
Heads up poker is the only option, I think.

Doesnt matter if bots can move freely.

Pages: [1]
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!