Provably fair games are gambling games in which it is mathematically provable that the house didn't change the way the winner is picked between the time the bet was made and the time the bet was realized.

Provably UNFair

To explain this in more depth, let's first look at provably UNfair games. One of the most famous gambling games is the slot machine. Few people know that these bad boys amount to as much as 70% of some casinos' income! Let's look at their history.

Slot machine

Poker Machine

The first machine of this type was created at the end of the 19th century under the moniker Poker Machine. It contained five decks of poker cards distributed on springs which got wound up when you pulled a lever. Depending on how much you pulled, the springs would get wound to different tensions and produce different results when spinning the cards. Upon winning, the player had to show the result to the bartender who would give them their prize – cigarettes, a snack, or a drink or something else non-monetary.

Poker machine

This machine was the first provably unfair game. The owners of the machine usually removed two cards from the game making it exponentially harder to get a flush for the highest prize. For the first time the house automatically always wins. We say that it's provably unfair because you can prove the lack of certain cards in the machine.

Liberty Bell

The next version was developed a few years later and had a different modus operandi. The inventor wanted to make automatic payment a possibility so he simplified the design.

Liberty Bell

He replaced 5 drums of card decks with 3 drums of poker card symbols, adding another symbol – the liberty bell.

When drums lined up so the symbols matched, it was possible to mechanically check the winnings – a needle would try and go through the drums which had a hole in them on the side, much like a modern day lock. If this lock clicked at a certain level, that level matched a prize. Although the chances of winning seemed greater because there were only three drums, the inventor statistically outsmarted the casual observer by adding the fifth symbol.

Liberty Bell machines became so popular they were nicknamed the “one armed bandit”. One armed because of the lever on the side, and bandit because people would get so hooked on the games they would leave their entire salaries in the machine. Because of this addiction and the similarity to poker due to using the same symbols as the cards had, Liberty Bell machines were outlawed.

This machine was unprovable. The only way to prove fairness in this game was to take it apart and study the drums and springs for elasticity etc.

Operator's Bell

To avoid regulatory problems, the “Operators Bell” was created some years after that. The card symbols were replaced with fruit images we still see today in digital machines, and the bell was replaced by the BAR – a version of the logo of the Bell-Fruit Gum Company which was responsible for the first run of these machines. The machines were in fact little more than statistical purchasing machines for chewing gum – the combination of fruit you got on the game was the same chewing gum you got from the machine.

Operator's bell

This transition to “fruit symbols” helped the operators avoid regulation problems and the spread of this popular technology continued.

Sound familiar? Think about the format and type of the various ICOs, tokens, crypto projects today…

The Electronic Age

In the 1960s, the first electronic slot machine appeared. It still worked just the same but the drums were spun by an electromotor, not springs. Despite this, the “arm” of the bandit was kept around because of sheer habit and nostalgia, and so that old customers wouldn't feel alienated. Familiarity was key.

If owners wanted to update the older machines, they would have to switch out mechanical parts, all of which depended on each other. This was incredibly difficult. With the modern, electronic machines, this became much easier. Replace a motor or the micro-controller giving it instructions and you're done. Clients couldn't know what was changed or what their chances of winning were as this information was not publicly available.

Bally electronic machine

Machines like these are unprovable because it's not possible to find out the real truth behind their claims without taking them apart completely and few were qualified to interpret the results of disassembly. It wasn't allowed, either, because of patents and intellectual property rights. Two decades later, the first fully electronic machines appeared.

Electronic screen slot machine

These machines were even easier to update to benefit the house. Although there were no simple programming languages at the time or an internet via which to download new files, it was easy to pull out the chip, reprogram it, put it back in, and be done with it. The machine could now have different ratios of wins and losses day by day.

Modern Machines

Modern slot machines are the culmination of all technology thus far, in addition to some advanced game theory. Game theory is the study of human psychology with the intent to influence behavior in a way that makes a person want to stay in a game longer. For example, see these machines.

Modern machine

Comfy chairs, ashtrays, food and drink allowed, lights, big colorful numbers and golden color tones everywhere. Even when a loss is registered the player is still rewarded with sensory overload. The player is turned into an infant who is distracted and entertained by lights and sounds as he presses a button.

Upgrades

How fair do you think these machines are? How provably fair do you think they are?

Modern slot machines are randomly checked by the gambling commission of its jurisdiction. Modern machines have EPROM chips (Erasable Programmable Read Only Memory) with software running them. If the software on those chips has been changed from its factory settings, the inspection can easily see this. To prevent the house from cheating, changing the software is incredibly difficult – these chips come out of the factory pre-programmed and fixed to specific values, and are tamper proof. They can be altered only in official service shops or in the factories.

EPROM

The image above shows a variety of such chips that are no longer in use and aren't allowed in slot machines any more due to the fact that they were exposed and reverse engineered. This is from an eBay auction for them.

But does this mean that the machines are fair? Do we believe their claims of payout percentages? The percentage a slot machine pays out over time is called RTP – return to player. It varies from 82% to 98% during its lifetime which means that of all the money that comes through it over its lifetime, 82-92% of it is returned to some of the players. But when advertising these percentages, the commission and the manufacturer and the casino are all asking us to trust them. There's no way to know which casino the commission is sharing a bed with – after all, it is a multi-billion-dollar industry.

To complicate matters further, the complex upgrade process of taking the machine to the shop is slowly becoming obsolete. A new standard was created in 2006 which allows remote upgrades. The only condition is that the device had to have been unused for 4 minutes before the upgrade and has to display a warning about having been updated remotely for 4 minutes after the fact. The warning does not have to say in whose favor the odds have shifted, nor by how much, and the 4 minute warning length is only a current regulation. The gaming commission can decide overnight that this is no longer necessary and that machines can now be updated even mid-game. The user would have no way of knowing.

So what does all this have to do with blockchain and provable fairness?

Provably Fair in Blockchain

From day 1 the level of fairness in a game of chance has been in the hands of the one who came up with it. Not just statistically, but in terms of handicap, advantage, and some other hidden tricks. With slot machines, the machine already knows if the current game is the winning one as soon as you pull the lever or press the button. It's all math. But the electronics controlling the outcome can change it if their owner so desires and there's nothing you can do about it.

The blockchain helps because it's transparent and immutable. When a piece of information – be it a winner-calculating algorithm or another arbitrary value – is written onto the blockchain, it's permanent and indestructible. Mathematical certainty helps because the math behind the function in the system is fixed.

It's important to keep the following in mind as we talk about blockchain and provably fair gaming:

  1. Provably fair is a spectrum. A game can be more or less provably fair – the more transparency the more trusted it will be and the more provably fair it is (or provably unfair – does not matter – as long as it's provable), the more players it will attract. Some games are 100% provably fair if they're fully open source for example, while others only keep the winner selection algorithm public for fear of reverse engineering the rest of their game's logic.
  2. When talking about the blockchain, it should be noted we're referring to the public blockchain – something like Ethereum or Bitcoin. A private blockchain makes no sense in this context and is no different from a private server in a casino.

When building any kind of gambling game on the blockchain, transparency is key. The more logic you expose, the more trusted your game will be. Additionally, the higher the chances of someone finding your bugs will be, which can lead to security improvements, prevention of large scale money leaks, and nice bug bounties.

Random number generation in the blockchain is a subject of much debate which we'll discuss in an upcoming post, but in general it's a good idea to kill any gambling app you build within a few months and redeploy it with new security considerations in mind, taking into account everything you learned in the meanwhile. The app should also have a self destruct function so that you can stop things if something starts going wrong, and it should have a timelock for funds withdrawals so that even if someone does abuse the system you have time to react before the money is in their hands. Disasters have happened because of a lacking failsafe of this type.

One of the more banal and simple examples of gambling on the blockchain is a raffle, and that's exactly what we built as an example. Check it out here.


If you found this article useful or interesting, please consider donating to keep our operation running.

LEAVE A REPLY

Please enter your comment!
Please enter your name here