Bitcoin Forum

Bitcoin => Project Development => Topic started by: abrkn on December 13, 2012, 07:54:44 AM



Title: Making a progressive jackpot provably fair
Post by: abrkn on December 13, 2012, 07:54:44 AM
I'm running a few games (http://luckco.in) (video poker and slots) and have gotten into the trouble of not being able to prove fairness.

- How can I prove that the outcome of each game is known before the fact?
- How can I prove that I am not letting myself or a friend win the jackpot every time?


Title: Re: Making a progressive jackpot provably fair
Post by: Stephen Gornick on December 13, 2012, 08:45:56 AM
- How can I prove that the outcome of each game is known before the fact?
- How can I prove that I am not letting myself or a friend win the jackpot every time?

Your reading assignments:

Provably Fair Shuffling Through Cryptography
 - https://techblog.bitzino.com/2012-06-30-provably-fair-shuffling-through-cryptography.html

BitZino And The Dawn Of 'Provably Fair' Casino Gaming
 - http://www.forbes.com/sites/jonmatonis/2012/08/31/bitzino-and-the-dawn-of-provably-fair-casino-gaming/

Using SHA512 hash as random number generator for Gambling services
 - https://bitcointalk.org/index.php?topic=77206.0


Title: Re: Making a progressive jackpot provably fair
Post by: FreeMoney on December 13, 2012, 10:46:57 PM
Every system is going to be susceptible to brute forcing, the answer is just to use more bits to make it hard enough that it ins't worth it or can't be done before the sun dies.


Title: Re: Making a progressive jackpot provably fair
Post by: Stephen Gornick on December 14, 2012, 12:15:18 AM
Problem: I can still brute force a combination of client hash and server secret that will allow myself to win the progressive jackpot (royal flush)

Oh, ya, the progressive jackpot means you are not just playing against the house but against other players.  

BitLotto handles that by using an external event (results of the state-run lottery) which isn't known until after the betting window closes.

What isn't known at the time of the wager is the hash of the next couple blocks.  That would prevent that immediate positive reinforcement that keeps people playing though since you wouldn't know if you won for ten or twenty minutes after betting.

If your service uses the blockchain, maybe you could include a hash of the timestamp that blockchain.info.com shows for the transaction (e.g., epoch/unix time) to give something that is not known at the time of the bet, is not really controllable (not to the second) and becomes expensive if brute forced (due to part of the losses getting added to the progressive jackpot that potentially go to a winner other than the house).   Of course, this assumes that there is no collusion between the house and blockchain.info.


Here's something along the same lines, using the Twitter public timeline:
 - http://pyevolve.sourceforge.net/wordpress/?p=631

Where you use the timestamp to determine a tweet from the public timeline that occurs after the wager is placed, and the hash of that tweet is used.   Gah, that's crazy and still not provably fair.


Title: Re: Making a progressive jackpot provably fair
Post by: Stephen Gornick on December 15, 2012, 09:24:15 PM
the casino can choose not to pay you.

Yes, an online casino could do that but that is a one time occurrence and fatal for the casino (see John Corzine  / MF Global).  A casino that doesn't have crypto / provably fair has the ability to tip the odds just enough such that it is never noticed by the players.