What is a fair game? What, then, is a provably fair game? These concepts lie at the heart of a whole new industry which arises from the transparent nature of the blockchain.
The open and decentralized consensus mechanism existent in Ethereum, Bitcoin and most major cryptocurrencies, makes it possible for anyone to verify transactions using open source software that can be freely downloaded. Blockchain explorers such as Etherscan and Blockchain.info allow any user to inspect the blockchain and see for themselves how and when a particular transaction happened, the amounts involved, precise dates and a lot more metadata which is stored with each transaction.
A fair game is a contest where participants’ chance of winning is proportional to their stake in the game. If everyone stakes the same amount, then, a fair game should present every player with the same chance of winning. Games where it is allowed to buy bigger stakes, like a lottery for example, the probability of a winning game should increase proportionally with the invested amount. For example, if someone buys 10 lottery tickets they’ll have 10X more chances of winning than someone who bought one single game.
In real world lotteries, trust is placed on the lottery operator. These are usually heavily regulated and externally audited, though that doesn’t always guarantee the fairness of the game. Real world lotteries are, therefore, provably fair for as long as you trust the underlying draw process. If all numbers are equally likely and the draw happens in public, chances of fraud are lessened by the publicity.
But what if this process could be mathematically guaranteed to be fair?
That’s exactly what provably fair games are: games where fairness is mathematically guaranteed. The laws of probability are well known and are accepted by everyone involved in gaming architectures. The number of odds of winning divided by the number of possibilities is your chance of winning. As long as the draws and bets are kept public, then this process is easily audited. If game results skew too far from the expected probability, an audit can help reveal where the bias may be originating.
So what’s needed for a provably fair game to be implemented? Full transparency. And that’s where the blockchain really shines through.
In privately run games it is impossible to audit the process by which chance is established. There is no way to know how the winning odds and the complete search space were determined. Therefore knowing the true probability of the game becomes impossible. This was the reality of online gambling before the blockchain! Online games are basically black boxes where you trust the system.
With the blockchain, the computation itself is public. Take, for instance, a lottery game like ILOT Ethereum smart contract lottery. In this game, whenever Ethereum is received by the contract address, a hash is processed using currently available data from the Ethereum network. This hash is, for all practical purposes, completely random. The hash result is then committed onto the blockchain so everyone can see the result of the draw. The source code is open and can be audited by anyone and the lottery process is registered on the blockchain permanently. In this kind of game there is no way to cheat without being detected by the community. Audits are permanent and a natural part of the process. Once a hash has been drawn on ILOT, it is recorded in a broadcast event that anyone with a Ethereum explorer can audit.
Only the blockchain is capable of making this possible. The decentralized consensus system allows games to be run in a worldwide virtual computer that everyone can trust. As long as the draw and the result is public, there is no way to cheat the game.
What happens then if I find a flaw in a game? It’s simple: like everything else in the cryptocurrency world, the community is the key to guaranteeing transparency and fairness. Individual nodes verify Bitcoin transactions 24×7, even when they’re not mining. The blockchain can be verified by anyone running a full node! And whenever invalid transactions arrive, the system must broadcast the fact that X transaction is fake or invalid. The same applies to games. Once something fishy is detected, the community should spread the word via social networks like Twitter and Reddit. While some scams are able to fool a lot of people for a very long time, most cheating attempts fall before they reach the mainstream. A fast response is crucial to avoid giving perpetrators a potential reward for their fraud attempt.
In summary, for a game to be provably fair, it must:
- Be based on a public blockchain that anyone can audit.
- Be open source.
- Hold the draws in some public medium like an algorithm run by a smart contract on the blockchain.
- Publish game results on the blockchain.
- Provide a public whitepaper describing the algorithm employed.
- Offer winning probability proportional to the stake invested in the game. Buying five tickets should provide 5X the chance of winning of a single ticket.
If a game can be verified to uphold the above conditions, it is most likely a provably fair game that is decentralized and which can be played by anyone and not depend on arbitrary processes.
Dice Illustration Credit: Wikipedia
Work & Learn