Post
Topic
Board Gambling
Re: FairDice.biz: new bitcoin dice game; only 0,8% house edge; FREE BITCOINS!
by
Mitchell
on 11/08/2013, 18:19:50 UTC
Dice64,
Look at the long text above "Roll" etc buttons. For me this is:
79ede5fd0267edccc5f2faa965ec689625cae8ab209bc764b608e9a2613fbc94
This is SHA256 hash of server seed, which will be used for next roll.
The roll result for me was 5.
Make a roll. Click "i" button to view details about roll you just did:
Server seed: 151d74125854c103abadc770f4eb5e99                        
Client seed: 8617075205573747000

hash("sha256", "151d74125854c103abadc770f4eb5e99") === 79ede5fd0267edccc5f2faa965ec689625cae8ab209bc764b608e9a2613fbc94

So for now everything is OK.

Now we use the validation script:

$server_seed = "151d74125854c103abadc770f4eb5e99";
$client_seed = "8617075205573747000";

function str2int($str) {
   $int = 0;
   foreach (str_split($str) as $char)
      $int += $char;
   return $int;
}

mt_srand(str2int($server_seed . $client_seed));
$roll = mt_rand(1, 6);
echo "Roll result is " . $roll;


Thats what I mean, nobody knows that you should do it like that. That's why I suggested you to change the alert ;p

Quote
Also your house edge comes out at 0.8333333%, not 0.8%.
Good enough for me.