Provably Fair

What is Provably Fair

Provably Fair is a newer and much better system than the previously established "black box" type systems whereby the user can choose only the parameters of the bet and have no influence on the outcome. This is a definite shortcoming because the user can't prevent the house from scamming and precalculating the outcome of a bet. In short, in the provably fair system the user is given a value, called hash, which contains the house chosen secret and another random value (salt) which is used to ensure that the hash cannot be decrypted easily (you can easily compare it later as we'll provide the secret after each bet). Not only that, but you can influence the result of the bet by providing your own value called seed which is mixed during the bet with our secret to compute the final outcome of the bet. After the bet is done, parameters chosen and confirmed by you, we then announce the secret and the salt we used along with the result so that you can verify that we didn't rigged the outcome of the bet.

Below is a short comparison of a standard and a provably fair betting system.

Standard System Provably Fair
Predetermined result maybe * No
Verify result No Yes
User influence outcome No Yes
Transparency No Yes

* This doesn't necessarily mean the house is cheating but the user have no way of knowing if they do.

We've gone a step further to ensure a nice and top notch user experience by allowing you to download all the betting information and results. You can verify them anytime, even offline, and see that we're treating each of our clients fair and square. Our result validation system also shows the result with graphics and not with only letters. We believe this makes it much easier and overall better for the user to see the betting process.

Terms used

Secret: this is a hexadecimal string used one time (nonce). for example: 1259...9d21
Salt: again, a hexadecimal string used one time (nonce). for example: 8d1e...126f
Hash: SHA-512 hash of the salt and appended secret. for example: 0970...7d93
Seed: a user provided hexadecimal string. for example: 1240...fc93

How to perform manual off-site validation of the Coinrex provably fair algorithm

Let's say you got the following spin:

And we provided these values for validation:

Seed: 580f285a4469ffd4
Secret: 95efa98910dd624ee299a6f1f3805b881cb5ae8782e772184e69324453fe39f7
Salt: 6b6d88db1d4974de7cfec0209593401b164ac3670262116425fabd4a876c2c68
Hash: d5f58278c8f92d44b21549b1bd06cbde5c3da059afe00fa2fcf1b3e01054554449ad78946388945d1aba42ee91094ca105e8fcd43a1416cfce51880949bfcc91

1. First combine (concatenate) the salt to the secret and the calculated SHA512 hash must be equal to the public hash presented to you by the house:

6b6d88db1d4974de7cfec0209593401b164ac3670262116425fabd4a876c2c68 + 95efa98910dd624ee299a6f1f3805b881cb5ae8782e772184e69324453fe39f7
⇒ SHA512()

2. Then combine (concatenate) the secret to the user provided seed value and calculate the SHA512, this is the spin result:

95efa98910dd624ee299a6f1f3805b881cb5ae8782e772184e69324453fe39f7 + 580f285a4469ffd4
⇒ SHA512()

3. From the spin result, take the first 15 bytes and convert them from a hexadecimal into a decimal number (0 - 255):

hex: 69 70 3c 8f 02 c4 1d
dec: 105 112 60 143 2 196 29

4. Then, calculate each decimal representations modulo 64:

105 mod 64 = 41, which according to the look-up table is Q ⇒ First row, first column
112 mod 64 = 48, which according to the look-up table is J ⇒ First row, second column
60 mod 64 = 60, which according to the look-up table is J ⇒ First row, third column
143 mod 64 = 15, which according to the look-up table is Peach ⇒ First row, fourth column
2 mod 64 = 2, which according to the look-up table is Cherry ⇒ First row, fifth column

29 mod 64 = 29, which according to the look-up table is K ⇒ Third row, fifth column

5. Check all played lines for winning combinations.

Look-up table
0 = Jolly
1, 2 = Cherry
3, 4, 5, 6 = Pear
7, 8, 9, 10, 11, 12 = Water mellon
13, 14, 15, 16, 17, 18, 19, 20 = Peach
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 = K
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45 = Q
46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63 = J