PROVABLY FAIR
The outcome of all games can be verified once the day ends. But how is the result generated?
1. ELEMENTS
There are 3 elements that make up the generation of any game’s result:
Server secret seed. Think of it as a secret ingredient that remains hidden until the end of the day. Until it’s revealed, you can only see its hash.
Public seed. Unlike the secret seed, everyone can see it. It is the hash of one of the last Dogecoin blocks mined during the day (Blockchain).
Nonce. Ensures that each round is unique. It is a number that increases by 1 each time a round is played.
What is a hash?
A hash is a unique digital fingerprint of any type of information (text, image, file, etc.). It’s like combining all the information and generating a unique, short code. The magic is that for the same input, you always get the same code. For example, if our input were:
macaco -> 9ffe05b4553f32356d4d70f128ff0bb8c19f64275c45153ef26ed127e264a2aa
You would obtain a unique code. And if you changed the original input even slightly, you would get a completely different hash:
macacos -> 5554c3c7d648c487b73b5cbf8ff0e8868d2813ccdef0dde75b00bcec3b52550d
You can try it yourself on any website that calculates the SHA-256 hash and you’ll see that you get the same value (be careful with spaces), for example.
During the day, we display the hash of the secret seed but not the seed itself. This way, you can check if the seed has been altered by comparing the revealed hash at the end of the day with the one shown during the day. If the seed were altered, the hash would be completely different.
2. GENERATION
Knowing all this, how is a game result generated? For this, we use the HMAC function—a cryptographic function that takes as input a seed composed of all the above. For example, for a roulette round, the seed would be as follows:
ROULETTE-9ffe05b4553f323-75c71c75a7376:3
From left to right: GAME CODE, SERVER SEED, PUBLIC SEED, NONCE.
Once the result is calculated using the HMAC function, we transform it to obtain the game result. Depending on the game, we transform the result in one way or another. If you want to see the exact code, click on the game you desire at the top of this page.
3. DAILY PROCESS
With all that clarified, let’s understand how the seeds for each day are obtained.
Day 1 - 15:00
At this point, we can see the hash of the secret seed, the public seed, and the nonce, as well as the hash of the secret seed for the next day.
Day 1 - 23:55
Here we obtain the public hash of the last Dogecoin block mined during the day and save it as the public key for Day 2. Additionally, we generate the secret seed for Day 3.
Day 2 - 00:00
The secret seed from Day 1 is revealed for verification.
3. WHY CAN'T WE INFLUENCE THE RESULTS?
The public seed comes from something beyond our control (the Dogecoin block mined). In addition, we display the hash of the secret seed that we will use the next day. For example:
Day 1 - 15:00
At the top of the history page, you can see that the hash of the secret seed for Day 2 would be abbba.
Day 1 - 23:55
We obtain the public seed from the Doge block. Since the block’s value is completely random and external, and because we have committed that the seed for Day 2 is abbba (hash), it is impossible for us to influence the results.