Different levels of fairness in provably fair games 🎚️

Casino's

Provably fair algorithms are pieces of code created for the blockchain, which can provide a fair online gambling experience that is not only secure, but also verifiable. With the traditional black box algorithms from today’s online gambling industry, players don’t get to see if they’ve been played fair and square or not by the online casino. With a provably fair casino game, the entire history of the game is recorded, and therefore can be accessed at the end of the game to check for fairness.

A game that has a provably fair algorithm as base is often called a provably fair game. The definition of a provably fair game is simple: it allows players to get a clear, mathematical and unquestionable proof of fairness about the game that they’ve just played.

Whenever you’re playing an online baccarat game, for example, there’s going to be a randomized outcome every time a hand is being played. With a normal casino, you will not be able to verify if the randomized result of the hand is truly random and therefore fair. In a provably fair game, the players are given access and can verify if the draws are really random. As players, you can also check to see if the data of the game, the core and the rules are not modified after a certain number of played hands.

The cryptographic hash

Provably fair games are games that tell you the truth without leaving any doubts out. What makes this possible? They’re called cryptographic hashes. Think of this hashes as transformers of code. Whenever you insert a text somewhere, by using one hash you get to transform this text in a series of characters that cannot be translated or deciphered.

This allows the game to hash the secret information, such as the outcome of the next hand, until that very hand is played. Once the outcome is released, you can backtrack the information and see if the results of a certain game have been randomly selected, or if someone somehow interfere with them.

The levels of fairness in provably fair games

Before diving into the two most used levels of fairness of provably fair games, let’s better understand how a game of chance that’s based on the blockchain actually works. First of all, the provider generates some random number known as seeds. These seeds, one public for the player at the table, and one private or main from the house, get turned into hashes.

When the game is played and as the game progresses, these hashes are revealed as to show the outcome of the game, who’s winning what hand and how much money are they going to receive after a certain hand has been played. As soon as the last phase has been played, gamblers can verify if the outcome of one or every hand has been random and fair.

The actual process of revealing the fairness of the game is a tad more sophisticated, but to simplify the explanation and not dive into unnecessary terms and ideas, remember that you will find two main ways in which gaming providers will ensure you’re able to see the fairness of a certain game with your own eyes: number 1, they will simply reveal the proof about how the outcomes haven’t been altered with, or number 2, they will do exactly that but also give players the chance to influence, in some way, the randomness of the outcome, as well as the outcome itself.

First level of fairness 1: Revealing the hash

The game introduces the seeds as random numbers and gets them ready for the draw in whatever games of chance you’re playing. Before the start of the game, the provider hides the numbers in a hash and delivers the hash to all players at the table. This happens before the betting begins. When the game ends, the players can easily check if the combinations that they’ve received during the gameplay were compromised or not.

This is done by comparing the hash that the player receives before the game starts and the hash that the player can create at the end of the game, based on the outcome of the game. You might think there can’t be an even “fairer” level of fairness than this one, but you’d be wrong.

Second level of fairness: Hashing and a few random numbers

For even more security and fairness, the second level of fairness allows players not only to get into possession of their hashes, but to also generate some public seeds that will interfere with the final outcome of each hand, and therefore with the randomized outcome of the game. This will result in an even more random and fair game, as there’s human touch, sort of, added to a completely decentralized and random action. This solution is the most fair and random a provably fair game can provide for its players.

Case study: The virtual shuffle

A game of chance requires two main randomization processes. Number 1, the randomization of the game’s scope, as in, the shuffling of playing cards in a deck at the game of poker. And number 2, the randomization of each of the played hands in one session. A deck has 52 cards, which have to be shuffled in a random way, just as an actual dealer would do at the poker table. In the virtual world, each card has a specific number which tells you the value and suit of the card, and after they’re shuffled, appear in a randomized order as every card gets dealt.

To each shuffled deck, the code assigns a hash, a random number that encodes the actual values and suits of the randomized cards. The hash is available before the game starts, but it remains hidden throughout the gameplay. The hash is nothing more than a string of characters that uniquely identify your deck of cards.

The number of possible outcomes from when a deck of cards is shuffled is a huge number, which has 67 digits. That means, for every single deck of cards that has ever been shuffled in the entire world, and will be shuffled in 1000000 years from now, there’s no chance the combination will be the same not even twice. That is also the number of possible hashes you will get when you virtually shuffle the cards, as all hashes have to be completely unique. Because of this, no matter how great of a computer you are, or how good of a code decipher you might be, you will never be able to decode the hash.

Before the game begins, the virtual dealer displays the hash to all players at the table. When the game ends, the hash gets deciphered and all players can check it out to make sure the outcomes of the hands have been played out in a fair manner. This is how the players can be 100% sure that their game was fair and that all the hands were not mingled with during the gameplay. If you went all-in before an important flop, and you lost, the hash will reveal that the card that came on the flop was the random card that you actually got, and that nobody played with the result that you got and that lost you all of your chips.

An even more random outcome

In order to make this game even more random and provably fair, casinos can even allow players to mess, in a controlled fashion, with the outcome of the game, thus making the results even more random. This is possible when the players are invited to create a public seed, which in the case of a poker game would feel such as a deck cut.

The casino would start off by shuffling the deck and publishing the first hash. Then, a player is elected at random and he is invited to cut the deck, by choosing a number between 1 and 52. If the goes for 22, the public number (the public hash) is then interpreted as cutting the deck at the 22nd card. This means the dealing of the cards will begin at card number 23rd.

The cards are then dealt and the game begins and ends as it would normally do. When the game ends, the provider can reveal the original hash of the deck, from before the deck was cut, and the actual deck used in the game, the one after the cut. The players can therefore verify the fairness of the hands that have been played using the same methods as described above.

By adding a public randomizer to a random-enough game already, the provider of the game has an almost impossible task of rigging the game if they want to, because it’s nearly impossible to predict where the chosen player would cut the deck.


Alex Thompson

As a blockchain enthousiast, I can't help getting excited about a more fair online gaming world. I hope I can inform you about the possibilities and provide useful insights.

Leave a Reply

Your email address will not be published. Required fields are marked *