Cover photo

Crypto Casinos and The "Surprising" Math Behind Gambling

If you had to make money by gambling, what game would you choose to play?

I’ve been spending a bit of time thinking about this question recently, after a coin flip “double or nothing” crypto game garnered some traction and made its way across my twitter feed. How can you impose a framework to determine your best odds of making money in games where the odds are stacked against you? Is a table game with a skill component most beneficial? Would you be best served by trying your luck with a 50/50 coin flip, or something in-between? This coin flip game remained on my mind for the past week, as there are now thousands of people playing, yet the expected value of each bet made in this game is lower than the worst games in Vegas (and this ignores the fact that the Solana network TPS continues to be erratic costing players tens of thousands in lost SOL).

This made me ask myself, why are people playing this game? I believe the answer is two-part:

  1. The existing crypto-native gambling sites are bad.

  2. People don’t understand the math behind many gambling games.

As we wrap up 2021, the US gambling market is poised to have a record year grossing over $44 Bn in revenue - with forward looking annual growth rates north of 4% (the Online segment of the market has an annual compound growth rate greater than 17%). Despite COVID-19, the global market grossed $711 Billion in 2020.

In such a big market, why are existing solutions bad?

In my opinion, physical gambling actually does a good job servicing user needs. As traditional gambling migrated online, there was little innovation in how gambling can (and should) work. This is especially prevalent in the crypto space, with each new online casino somehow looking more like a copy-paste than the last.

An example of the homepage on www.bitstarz.com.
An example of the homepage on www.bitstarz.com.

The most striking thing about this is that across “different” online casino’s there are mostly the same games. Most major online casino’s utilize software from one of the several turnkey crypto casino software providers. The problem with this is that existing crypto-native casinos have all made the same mistake, they are trying to create a traditional casino, but with bitcoin. They are completely missing the opportunity to apply blockchain technology to marry decentralization and trustless validation with online gambling.

What could applying blockchain to a casino mean?

For starters, it would mean you would know the exact odds of each game, enabling guaranteed fairness. That uncomfortable feeling that you’re potentially getting ripped off when online gambling vanishes. Currently this is accomplished by casinos going through a registration process, part of which requires a (non public) third party audit to ensure “relative fairness” in their games. This transparency aside, a decentralized casino would enable distribution of casino profits amongst its’ owners + users.

To understand how this would work, it’s important to understand the two primary ways casino’s make money. In a game that is not against the house (think a table game like poker) there is a certain amount of every pot that gets “raked” by the casino (typically between 2%-10% of the pot). The second way casinos make money is through games with a negative expected value. Simply put this means that if you play the game for an infinitely long period of time, courtesy of the law of large numbers, you will end up with $0. This is accomplished with a bit of mathematical engineering to construct a game where your $1 bet will return $0.80-$0.99 on average.

“So how would that allow profits to be distributed amongst owners and users?”

I’m glad you asked. A complete answer is a bit of a longer tangent, but in short you would distribute something (either a token or NFT) to represent fractional ownership of a decentralized casino, and distribute the profits proportionally to holders.

Finally, onto the sexiest part of gambling… The Math.

To create an overly simplistic example, we’ll imagine one of the simplest slot machines you might find in Vegas. Let’s say this hypothetical slot machine has three reels, the first with four images, the second with five, and the last with three.

A stock three reel slot machine.
A stock three reel slot machine.

To calculate the total number of possible combinations our machine can have, we multiply the total number of possible options (images) on each reel. In this case that results in (4 x 5 x 3) = 60 total possible combinations. This slot machine has a predetermined number of combinations that pay out money to the player, so next we will calculate the summation of the product of every payout and the frequency with which it occurs. For example, if we return 1x the player’s bet for 8 different combinations out of the 60 total possible (1 x 8/60), 3x the bet for 1 combination (3 x 1/60), 17.5x the bet for 1 combination (17.5 x 1/60), and 30x the bet for 1 combination (30 x 1/60) our game would have a (1 x 8/60) + (3 x 1/60) + (15 x 1/60) + (30 x 1/60) = 97.50% payout percentage. On average, we would expect a $1 bet to yield a $0.975 return.

So what game should I play if I needed to make money?

Back to our original question. The obvious answer you probably already knew (which isn’t financial advice, but I mean c’mon it probably should be): you lose money in the long run gambling in any non-skill based capacity. The subsequent answer is also not financial advice, but speaking academically the correct answer is a table stakes game (poker or blackjack) as it is possible to have a statistical edge when played correctly. If you are constrained to online gambling with no skill prerequisite, the uninitiated may think that our previous example of a double or nothing coin flip provides a better expected return with an expected payout of (1/2 x 0) + (1/2 x 2) = 1.00 (on a $1 bet).

However: when we look under the hood, the team at “Degen Coin Flip” implemented a 3.5% rake on every win, where 0.25% goes to the team, an equal 0.25% funds the entirety of their house wallet, and they capped betting at 2 Solana (no martingale betting here…) this means the expected value of each coin flip is actually (1/2 x 0) + (1/2 x 2) - 0.035 = 0.965… The moral of this story is, for this game to be fair the house fees cannot be as high as any of the existing casinos. If you want to keep tabs on a better solution I’m building, keep up with me on Twitter.