Mr.Box
Provably Fair

Provably Fair

What is 'Probably Fair'

Players always fear being cheated in online games. This is understandable because technically it's very easy for an online game provider to make you lose. At Mr. Box, we have a solution for this called probably fair. Probably fair is a tool that allows you (the player) to verify every roll result and make sure you're not being cheated!

How does Probably Fair work?

With this method, every roll result is calculated from the following variables:

  • Server Seed - A random string of characters provided by us
  • Client Seed - A string of characters generated by your browser that you can change
  • Nonce or Play Count - A number that increases every time you play

You'll receive a cryptographic hash of the Server Seed before you start playing. Since you get it in advance, we can't change it later. However, it's encrypted, so you can't calculate your own roll results in advance (only afterwards, if you get the unencrypted Server Seed). The Server Seed is hashed using the SHA512 hashing algorithm. Your browser will generate a random Client Seed. However, you can and should adjust this Client Seed before starting. This way you can ensure that the site doesn't know your Client Seed in advance. Now if you make a bet, the Nonce starts at 1. After each bet you make, the nonce number will increase by 1.

Calculating the roll result

Now come the nerdy things! There are 3 steps that lead us to the final number obtained in this game.

Step 1 - Hashing the variables

In this step, we calculate the HMAC with the SHA512/256 algorithm using the Server Seed as the key, and the Client Seed and Nonce as data, concatenated by a dash (-). You can calculate it yourself; go to https://www.writephponline.com and run this code: echo hash_hmac('sha512/256', 'your client seed-your nonce', 'server seed'); The result will be 38611068f6936027c4657138536fb5bb8f82a6cb2d883f1acb47cb24013f9e93

Step 2 - Converting the hash to a number

In step 2, we take the result obtained in the previous step and transform it into a number; go to https://www.writephponline.com and run this code: echo number_format(hexdec('38611068f6936027c4657138536fb5bb8f82a6cb2d883f1acb47cb24013f9e93'), 0, '.', ''); You'll get 25501016943689873370561741542489390377389678092728534236058081515070178721792, a very long number.

Step 3 - Calculating the final roll

Since we want to get a decimal number between 0 and 100, we first divide the number in the previous step by the maximum possible number, which is 1664 (64 is the length of the hashed string of letters obtained in Step 1). Finally, the roll is calculated: roll = 0 + divided number * 100. In this example, the result is 22.0231.

How is the prize chosen?

see the rolls by clicking on 'View rolls' at the bottom of the page. For each item in the box, you'll see the number you need to get with the roll to find that prize, for example from 95.54 to 97.22. This means that if you get a number greater than 95.54 and less than or equal to 97.22, you'll find that prize.