< backSeptember 21, 2021

The Provably Fair Algorithm: Bitcoin Gambling with Online Casinos

TrustDice Bitcoin Casinos Provably Fair Algorithm


A unique concept arising from crypto casinos is termed as Provably Fair. In essence, it is a system that works on an algorithm where the player doesn't need to trust the online bitcoin casino but is able to verify the results. Gone are the days when traditional casinos could rig slot machines and manipulate the results. If you are gambling at online casinos, you must have heard about provably fair games by now. This guide is dedicated to exploring all the features, components and uses of the Provably Fair system.

How does Provably Fair Gambling System Work?

The provably fair system works on generating results from the data entered by the player and the online casino. Both the player and the gambling site provide a string called “Client Seed” and “Server Seed” respectively. A string is then prepared using the seeds and then results are generated using an algorithm. The algorithm may vary for each online casino and some may use nonce while some don’t.

The online casino provides a "Server Seed" but it's not directly visible to the player. If the seed is directly visible it would allow the player to manipulate results. Hence the provably fair casino provides the hashed server seed and the actual seed can be revealed after the result is out.

For example, if the original Server Seed is "TrustDice", the casino will hash it to something like: ffeba21861d11233eec3a7210ae98e6ecfaf8e9cb6274013b65e13c66e032326 (SHA-256 of “TrustDice”)

Once the result is generated, the player will be shown the original seed. Once you have the seed, you can verify whether its hash matches the one given before the result was generated.

The unique thing about the SHA algorithm, which is used for hashing is - a slight change in the input will generate a completely new output.

The SHA256 of "TrustDice" is: ffeba21861d11233eec3a7210ae98e6ecfaf8e9cb6274013b65e13c66e032326

But the SHA256 of "trustDice" will be: b43936dcddf15736a9ce5e7e6115b9653368f627c95a0defad3cb9b73795d51d

As evident from the outputs, just by changing the case sensitivity of a single alphabet, we get a completely different output. This means if the casino changes anything from the original seed, the random hash won’t match the one given earlier.


How are the Results Generated?

We are going to take an example from TrustDice to define how the results are generated. Consider the bet shown below.

Provably Fair bet information


The client seed is: Kr962epL4ENxcD2V1RlXESNXlMGQ4Nk2

The server seed is (revealed after bet result is out): d30e8ed9ba544e251165a0252ef075b5fecdb9bbcac41518ab28a63dff9f8a40 

The hashed server seed: 8862077ba4c3b607d8dc089acbfb14b3d19c4ad89eb0fbb41e071d35fc57725f 

Salt: trustdice

Result: 39 


A string is created using the above data in order like: (serverSeed, clientSeed, salt) 

The string for above bet will be: (d30e8ed9ba544e251165a0252ef075b5fecdb9bbcac41518ab28a63dff9f8a40, Kr962epL4ENxcD2V1RlXESNXlMGQ4Nk2, trustdice) 

A function is then used to generate the result. You may click on the verify button to verify the result and see how the result is generated and what function is used.

Note: Some online casinos use Nonce too. Nonce is basically the number of bets made with the same server seed.


Benefits and Drawbacks of Provably Fair Method

The benefits of using the provably fair algorithm definitely outweigh the slight negatives that comes with it. As a player you must know what are the features but also the drawbacks. Mostly the advantages are towards the players while drawbacks are areas where online gambling sites need to improve.


Provably Fair Games Benefits 

  • Ability to verify the bets

As a player, losing any bet hurts. But if you are at least able to verify the results, you know you were really unlucky. The online gambling sites always have an edge against the player but shouldn’t be able to cheat players, a fair play. With the ability to verify your bets and influence the result by changing random Client Seed, you are more in control of your gambling results.

  • No need to trust the online casino gambling sites

Oftentimes, players play at casinos with a good reputation. That’s because there is a certain chance that a new casino might be rigging games and manipulating them to make the casino win more often. With gambling sites like TrustDice, there is no need to trust the traditional casinos when you can simply verify your bets instead.

  • lower House Edge

House edge is basically the advantage the casino has over the player. The higher the advantage, the lesser are the chances of the player to win. Traditional slots and games operate at ~5% house edge. But crypto casino games that work on the provably fair system usually operate at a minimal 1-2% house edge. This directly boosts your chances of winning.

  • Verification Over Randomization

Traditional casinos use random scripts to generate the results. Crypto casino games that work on a provably fair system generate results through data and an algorithm that can be verified. Verified results are far superior to random results generated because the chances of manipulation don't exist when results can be verified.


Provably Fair Drawbacks

  • Operator At Risk

The online gambling operators are prone to hacking attempts from the players since the code is public. If the casino has any holes there is a high possibility some player may end up exploiting it. Due to the nature of cryptocurrencies, it is impossible for the online casino to do much once a bug has been exploited. There have been cases in the past when crypto casinos were exploited for existing bugs.

  • Limited and Simple Pool of Games

Although new bitcoin casino games are developed every day, the pool of games for crypto casinos is quite limited with bitcoin Dice the most popular game. Hopefully, more provably fair casino games will be developed in the near future. The online games within the crypto casinos are simple as compared to the traditional fancy slots.


Should I randomize the Client Seed for Every Bet?

You may or may not but what's important is to verify your bets. What seed you or the online casino picks doesn't really guarantee you a win or a loss. Randomizing seeds is important because casinos cannot reveal the previous unhashed seed unless you randomize and replace it with a new one. Once the unhashed seed is revealed, you can verify your bets made with it.

It's best to randomize your seed after every couple hundred bets. You may randomize it after fewer or more bets depending on what suits you best. Sometimes if a seed is not giving you wins, it is a good idea to change it.

Remember with a provably fair algorithm, the crypto casino cannot cheat you once you win big. There is a common myth among gamblers that a casino will cheat if they bet big. This doesn't hold true with provably fair gambling systems because each bet can be verified.



Provably Fair is the future of not only the bitcoin gambling community but the entire online gambling systems. Implementation of a provably fair algorithms in complex games is hard. It's a slow process to create games with a provably fair mechanism but developers are working on it. In the future, we might see almost every game working on this model. This gives immense control to the player and eliminates the Trust Factor from online gambling. As a player, you must always verify your bets every now and then to ensure the casino is not cheating. The whole idea behind this system is to keep the betting process as transparent as possible.

Related Articles:

  1. Wildcoins Casino: An In-depth Casino Review
  2. Crypto Thrills Casino Bonus Codes 2022 | Are they any good?