Author

Topic: How to check fairness of your bet - based on Luckydice (Read 280 times)

legendary
Activity: 2156
Merit: 1622
Top-tier crypto casino and sportsbook
I got different, maybe I have a mistake again?

They might have complete different hashing method (f.e. nonce:client seed instead client seed:nonce) and different calculation method. Copy everything they have in fairness section and I'll try to help you.

@Yatsan @crwth I agree with you that casino earns as much as it's reputation is worth (more reputation = more income). It is not worth to risk reputation if you earn constant profit on statistical advantage over every player but sometimes strange things are going on. F.e. hack. If casino lose 100% of customers fund it can exit scam or hold withdrawals while implementing fractional reserve system and cheat few important bets to increase liquidity to continue functioning.

In conclusion: It's always good to check at least 1 bet once per day even on most reputable casinos and I'll do my job to spread this practise here Smiley
legendary
Activity: 2576
Merit: 1252
Leading Crypto Sports Betting & Casino Platform
To be honest, I actually just know that if it's "Provably Fair" I'm just going to trust the casino site (This is for reputable crypto casino sites that I played in). I never bothered to check the actual validity of the rolls that I get. I just know that I get a new seed when I play too long with that or something in that regard. For sure there are a lot of others who do this as well.

Anyways, I now have an idea with that, thanks to your post. Maybe I would try it on other sites as well, just out of curiousity.

You are right. Most of the gamblers blindly trust a casino if it claims to be "provably fair" without checking even a single bet. And as Sadlife said. Some casinos claim to be provably fair but there is no explanation on site how to convert raw data into final resoult.

In my opinion it is important to check at least 1 bet per day not only for us but for whole community. If 10 000 gamblers will check 1 bet daily we have 10 000 checked bets. If casino is cheating in 0.1% of bets we will (from statistic point of view) have 10 cheated bets, and we will expose scam. That's why it is important in my opinion to promote checking your bet even once per 100-200-1000 bets.
As long as the gambling site is legit there will be no problem. Famous bitcoin casino's has built their reputation for years and I don't think they will cheat their players for just a few bucks. Online casinos like primedice, bitsler etc. has been here in forum for years so my trust is 100% for them and I think they will never cheat me cause they prove that they are 100% trusted casino.

It's okay to be a hobbit for new casinos cause they have a high chance of cheating but it would be a waste of time for the trusted ones, that's just my opinion  Smiley
copper member
Activity: 2940
Merit: 1280
https://linktr.ee/crwthopia
You are right. Most of the gamblers blindly trust a casino if it claims to be "provably fair" without checking even a single bet. And as Sadlife said. Some casinos claim to be provably fair but there is no explanation on site how to convert raw data into final resoult.
I think it's okay as long as the casino is reputable. For example, Bitsler. I have been playing there for a long time and as I see people there gambling, it's okay. There are a lot of active players and I think they wouldn't have reached that reputation without the verification right?

In my opinion it is important to check at least 1 bet per day not only for us but for whole community. If 10 000 gamblers will check 1 bet daily we have 10 000 checked bets. If casino is cheating in 0.1% of bets we will (from statistic point of view) have 10 cheated bets, and we will expose scam. That's why it is important in my opinion to promote checking your bet even once per 100-200-1000 bets.
It's going to be good if this gets organized. It's going to be beneficial for everyone in the gambling community. More data, more analysis, more conclusions for the greater good.
legendary
Activity: 2366
Merit: 2054
i have mistaken multiply it with 6.

I do test my bet on freebitco.in

SERVER SEED : 48d0e93773738bdc9d1079f41a59b6e615746997e51616d4cc418509ef46bc26
SERVER SEED HASH : 1fb30c655ffad56be6dbb40b878629456f9795cf669eb47f0e849319f36caec9
CLIENT SEED : vZ0aTvj31W3nWllj
NONCE : 573

server seed : 1fb30c655ffad56be6dbb40b878629456f9795cf669eb47f0e849319f36caec9 (corrected)
computed mac : d2b00c13a5fbc1b46191fbae4f051b1f26a4caf99c20142a03a9052cbcddb064

4 byte 8 digits : d2b00c13

d2 = 210
b0 = 176
0c = 12
13 = 19

(210/256)+(176/256^2)+(12/256^3)+(19/256^4)= 0.822998750875

I got different, maybe I have a mistake again?



legendary
Activity: 2156
Merit: 1622
Top-tier crypto casino and sportsbook
@DroomieChikito with luckydice you can play "clasic dice" which looks like that:



That's why you calculate dice 1 and dice 2.

Simpledice.com game looks live every high/low game. This is what i found in their fairness section.

Quote
To create random results (events) that happen during the game a special formula is used. First four bytes of HMAC_SHA256(K,m) function’s result need to be converted into decimal values (0-255 each). First byte is divided by 256 (256 raised to power of 1), second byte is divided by 65,256 (256 raised to power of 2), third byte is divided by 16,777,216 (256 raised to power of 3), fourth byte is divided by 4,294,967,296 (256 raised to power of 4). The sum of the divisions is an equally distributed value greater than or equal to zero, but smaller than one. Final game result is calculated by multiplying that value with 10,000 and taking only full part (floor) of that figure and then dividing by 100.

So you need 4 bytes - 8 digits: 7c7eeee8

First byte: 7c
Second byte: 7e
Third byte: ee
Forth byte: e8

Hex to dec:
7c ->  124
7e ->  126
b3 ->  238
e8 ->  232

(124/256)+(126/256^2)+(238/256^3)+(232/256^4)= 0.4863118473

Now we need to multiply it by 10 000, take floor and divide  it by 100.

floor(0.4863118473 * 10 000) = 4863
4863/100=48.63 - is that correct?
It looks like it is. That's the same what we get from calculator provided by casino.


legendary
Activity: 2366
Merit: 2054
Sure but I don't know this site. It may calculate results a bit different. It looks like another Bitkong child but i can't find it. Throw link and I'll help you.
look same like your post but i am not sure.

I have put compute mac result : 7c7eeee861413c26a4d45d6968a50b51cb6a0582649af9d48865a174c3140b1e

16 digits 7c7eeee861413c26

8 first bytes is :

7c7eeee8 ; dice 1 result
61413c26 ; dice 2 result

.....

Q: is the final result must be 1 and 2 to get correct?

The final dice result is
[0.78]+1 = 1
[1.25]+1 = 2

Because i got 13.228114128112793 for dice 1 result.
legendary
Activity: 2156
Merit: 1622
Top-tier crypto casino and sportsbook
To be honest, I actually just know that if it's "Provably Fair" I'm just going to trust the casino site (This is for reputable crypto casino sites that I played in). I never bothered to check the actual validity of the rolls that I get. I just know that I get a new seed when I play too long with that or something in that regard. For sure there are a lot of others who do this as well.

Anyways, I now have an idea with that, thanks to your post. Maybe I would try it on other sites as well, just out of curiousity.

You are right. Most of the gamblers blindly trust a casino if it claims to be "provably fair" without checking even a single bet. And as Sadlife said. Some casinos claim to be provably fair but there is no explanation on site how to convert raw data into final resoult.

In my opinion it is important to check at least 1 bet per day not only for us but for whole community. If 10 000 gamblers will check 1 bet daily we have 10 000 checked bets. If casino is cheating in 0.1% of bets we will (from statistic point of view) have 10 cheated bets, and we will expose scam. That's why it is important in my opinion to promote checking your bet even once per 100-200-1000 bets.
copper member
Activity: 2940
Merit: 1280
https://linktr.ee/crwthopia
To be honest, I actually just know that if it's "Provably Fair" I'm just going to trust the casino site (This is for reputable crypto casino sites that I played in). I never bothered to check the actual validity of the rolls that I get. I just know that I get a new seed when I play too long with that or something in that regard. For sure there are a lot of others who do this as well.

Anyways, I now have an idea with that, thanks to your post. Maybe I would try it on other sites as well, just out of curiousity.
legendary
Activity: 2156
Merit: 1622
Top-tier crypto casino and sportsbook
would you continue my step 3?  Grin Grin I am lazy to do next.

Sure but I don't know this site. It may calculate results a bit different. It looks like another Bitkong child but i can't find it. Throw link and I'll help you.

edit: ok i've found it. I will do it today.

Great work @Tytanowy Janusz

Apparently we are having some whining gambling losers in scam accusations who are accusing casinos just on the basis because they are having long streak of losses and which seems to be unreal to them. It would be great if you can explain to them it provably fair works on that site and prove it is not scam.

https://bitcointalksearch.org/topic/bitkong-potentially-scamming-its-users-5196352
I've been there. Thanks for link but there is nothing I can do without server seed, client seed, nonce which he won't have becauase all he has is rumors. I left link to my post there.

legendary
Activity: 3094
Merit: 1472
Great work @Tytanowy Janusz

Apparently we are having some whining gambling losers in scam accusations who are accusing casinos just on the basis because they are having long streak of losses and which seems to be unreal to them. It would be great if you can explain to them it provably fair works on that site and prove it is not scam.

https://bitcointalksearch.org/topic/bitkong-potentially-scamming-its-users-5196352
legendary
Activity: 2366
Merit: 2054
I plan to do few guides more. Maybe roobet/mintdice/bustadice? Any particular online casino would you like me to chose for my next guide? I'm open for any sugestion.

would you continue my step 3?  Grin Grin I am lazy to do next.

I am followed until step 2, want to check simpledice I have played. Still not sure I am correct or not.

1- Check if Server seed is correct



Code:
server seed: 5e20b3a2d6d2fb8e30b6ff212a255916e74e407edd00b59471854f6029a4b1f4
server seed : 4c028bf003685ebe1742385ec66144613e8506d004abf9fc3a48f81218c168a8
client seed : 8424310a1ec7eb4a7fcf335a1e43d584
nonce : 8466



server seed : Correct!

2. Calculate HMAC_SHA256(K,m) function



compute mac: 7c7eeee861413c26a4d45d6968a50b51cb6a0582649af9d48865a174c3140b1e
hero member
Activity: 2268
Merit: 669
Bitcoin Casino Est. 2013
As what I have noticed, there are newbies who are interested on a casino and doesn't have much knowledge about the fairness and this thread will help those newbies know how to check if the site is fair and each result are completely random. Nice work with the guide surely this will help a lot.
sr. member
Activity: 1932
Merit: 442
Eloncoin.org - Mars, here we come!
I plan to do few guides more. Maybe roobet/mintdice/bustadice? Any particular online casino would you like me to chose for my next guide? I'm open for any sugestion.
Well, for now, let us see how the Roobet gambling platform performs the provably fair system that they are claiming at. I just want to know how it works. Indeed, thank you on this very informative thread. I am almost 3 years in the crypto online gambling industry but I don't know how to verify the fairness in every bet either dice or bet. I now have an idea of how the provably fair mechanism verify the hash seed per dice or bet.
legendary
Activity: 2156
Merit: 1622
Top-tier crypto casino and sportsbook
I plan to do few guides more. Maybe roobet/mintdice/bustadice? Any particular online casino would you like me to chose for my next guide? I'm open for any sugestion.
legendary
Activity: 2156
Merit: 1622
Top-tier crypto casino and sportsbook
Provably fair mechanism implemented in most gambling sites gives us tool to check if site provider is not scamming us by picking numbers in non-random way. I encourage all of you to check at least few of your bets and avoid games without provably fair mechanism. It's not that hard to do that. Here you can find step by step guide on how to check fairness of your bet using provably fair system used on Luckydice games. I plan to post here Guides for more sites in the near future.

Click on Activity [1] -> MY BETS [2] -> choose bet that you want to check and reveal its details [3] -> copy Server Seed (Hashed) - that's mine: dd278ba121872e8527861c0c163afc57b5baa70ae1c25f03837474bce92efb1c  -> Clink on RANDOMIZE [4] to reveal server seed (from now on every next bet will be made using new Server Seed)



Copy Server seed, client seed and nonce.

Server seed:
bafeeb0d100b41c1296273d1b7eff123cff55233674d229dee2a4d8958f5b169

Client seed:
37c3b51b49f6f0cb60b2c0e64cc26a98

Nonce:
2

Now we have every data that we need. Lets do the math:

1- Check if Server seed is correct - hash it with SHA256 and check if you will receive Server Seed (Hashed). The easiest way to do that is to use online tool f.e. https://emn178.github.io/online-tools/sha256.html



Correct !

2- Calculate HMAC_SHA256(K,m) function
K- Server seed
m = "{client_seed}:{nonce}:{round_number}:0" - its   37c3b51b49f6f0cb60b2c0e64cc26a98:2:0:0 for me.
We can use this tool - https://www.freeformatter.com/hmac-generator.html#ad-output for calculation.


I get: 2202b355351a1b6b5393fd4fa4e820785ed3336d0fd81eac707226886b53717a

3- Get final resoult
3.1
In my case i'm checking "CLASSIC DICE" game. So i need first eight bytes.

Calculating first dice result:

First four bytes: 2202b355

First byte: 22
Second byte: 02
Third byte: b3
Forth byte: 55

Hexadecimal must be converted to decimal:
22 --->  34   (a)
02 --->  2     (b)
b3 --->  179   (c)
55 --->  85   (d)

Now you should use the following formula to obtain a value between zero and one

(a/256)+(b/2562)+(c/2563)+(d/2564)

(34/256)+(2/2562)+(179/2563)+(85/2564) = 0.13

0.13 must be multiplied by 6

0.13*6 = 0.78

The final dice result is

[0.78]+1 = 1

Calculating second dice result:

Second four bytes: 351a1b6b

First byte: 35
Second byte: 1a
Third byte: 1b
Forth byte: 6b

Hexadecimal must be converted to decimal:
35 --->  53  
1a --->  26    
1b --->  27  
6b --->  107


(53/256)+(26/2562)+(27/2563)+(107/2564) = 0.207

0.207 must be multiplied by 6

0.207*6 = 1.25

The final dice result is

[1.25]+1 = 2



The final dice result is
[0.78]+1 = 1
[1.25]+1 = 2
Correct !

3.2
What if I was playing "DIGITAL DICE"? I need first 4 bytes - 8 digits: 2202b355

We do the same steps as with "CLASSIC DICE" but we stop here:

(34/256)+(2/2562)+(179/2563)+(85/2564) = 0.13

hosseinimr93 rounded the result, but its exact form is 0.132858753

Now we need to multiply it by 10 000, take floor and devide it by 100.

floor(0.132858753 * 10 000) = 1328
1328/100=13,28 - and that would be the resoult if I would play "DIGITAL DICE" instead of "CLASSIC DICE" in this game.
Jump to: