Provably Fair Gambling
What does provably fair mean?
The worse fear a player has playing at an online casino is being cheated by the site they are playing at.
In the Bitcoin gambling community a standard solution has been developed to allow players to verify the results of their bets, to prove that the house did not alter them in their favor.
How does it work?
You can use this 3rd party tool to verify your bets from the Pocket Rockets Casino dice game http://dicesites.com/betking/verifier without the need to understand the math behind the method.
- When you first visit the site we generate a random string of characters on the server used as your Server Seed. A new server seed can be generated by you before you roll.
- A SHA-512 hash of the server seed is shown to you before you bet to prove we can't change it.
- When you bet we get a Client Seed you supply (one is auto generated by your browser that you can change).
- We take the server seed, client seed and the number of rolls that you have used the current server seed for in the format: n:s:n, n:c:n. Where n is the number of rolls, s the server seed and c the client seed. We take the HMACSHA512 hash of that. We convert the first 5 characters of the hash to decimal and that is your roll.
- Sometimes the first 5 characters will not result in a number we can use and so we loop through the next 5 characters 6-10, 11-15 etc until we find one. The code for this is below.