If you have been around social media you have definitely seen people bet and win huge amounts of bitcoin or other crypto currencies on the game called Crash. The game is super simple: You bet a set amount of money and when the game starts you watch a multiplier rise over time. You can cash out at any moment, and the longer you wait the more money you earn. But beware, if the multiplier crashes you lose your bet!
The game is super fun and exciting to play as you are in total control of when to cash out even when the game has started, and it is extra fun to play with friends as the adrenaline starts flowing as soon as you are over the 2x mark. The multiplier rises quickly and you often see multipliers above 5x, 10x, 20x or even 100x. While it is hard to time you cash out to reap the ultimate benefits, you can still grab some nice payouts before the crash comes.
Alright, storytime: Crash is a game that originated from the first-person-shooter CS:GO, where players could earn and trade cosmetic skins. Soon, the trading market developed a gambling culture and different gambling versions popped up all over the internet. One of these gambling games was Crash, where players traded their hard earned skins into currency and could bet it on a rising payout multiplier that could easily rise over x2, x10 or x100 but at the same time had the chance of crashing at any moment.
The game became very popular among gamers, and soon it spread to real money gambling. Now, people can bet crypto currency worth real money and a lot of different online casinos have stepped on the journey to develop and improve the game. The game is so simple and exciting that it catches on easily, and it’s super fun to play among friends, as there is the element of control where the player can step out of the game round at any time. The game becomes more fun as people get more gutsy and want to see higher multipliers. This means that there is always an adrenaline fueled mood, and a lot of emotions going on.
The emotional part of the game created the next big break for Crash as a peoples favourite. As the Tik Tok app became super popular during 2020, content creators made bets and posted videos on the app where they have the guts to stay for as long as possible. Other creators took to the game to show examples of winning strategies and explore the opportunity to earn money from the online casinos.
All kinds of content boomed on the Tik Tok platform and the word spread that you could play this game online from anywhere, which increased its popularity even further. It was obvious that this type of chicken race-gambling was more exciting than regular slots or casino games that are usually pretty calm and non-interactive.
So for the ones interested, we can go through the nerdy stuff happening behind the screen: The outcome of the multiplier is decided by an algorithm that randomizes multipliers between 1.00-infinity with a mathematical function with a mean payout of about 2.00. This means that about half of the rounds will end before 2.00, and half will continue on after 2.00. As the function increases its standard deviation as time passes, larger multipliers are fairly normal and goes towards infinity. The highest ever recorded multiplier was 659072.86x on the popular Roobet platform. This means that a 10 dollar bet would net you over 6 million dollars!
I’ve seen a couple of videos and posts on strategies to try to profit off of this game. A lot of these casinos actually post the code behind their games, so I thought it would be cool to take a look at this code and see mathematically what the chances would be of profiting from these games.
The functions we’re going to look at are:
1. The “Generate Hash”-function which links the games together,
2. The “Get Result”-function which calculates the multiplier for each game, and
3. The “Previous Game”-function
If you click on the results of any game there’s a hash that’s associated with it. I replicated these two functions in Python and we can see that if you plug this game hash that we just found into the “Get Result”-function, we get the result of the game that we just saw.
When we plug the hash of the game into the “Previous Game”-function we get this new hash, and if we look we can see this hash actually turns out to be the hash of the game that came just before the one we are looking at, so we can keep using this get “Previous Game”-function as well as the “Get Result”-function to find find the result of every game that has ever been played. Doing that, as we go along, we’re going to keep track of the results so that we end up with the results of every game that has ever happened.
Running this code we can see that there’ve been almost 620 000 games and now we have the results for each one of these games as well. We also see that the minimum result is 1 and the maximum result is 658,000.
Here’s the distribution of these 620,000 games and this tail over here actually goes a lot further but the bins are just too small to be able to see.
Let’s take a closer look at the math behind this “get result”-function. We can see that we’re passing in this game hash and what these first couple of lines do right here is basically create a new hash out of this hash that we passed in. Hashes are really just hexadecimal numbers so we’re taking this new hash and we’re checking if it’s divisible by 33 and if it is, the function returns 1 and all players immediately to lose their bets.
This means that about 3% of the time the game will instantly crash. When the number isn’t divisible by 33, the multiplier is calculated using this function here:
Here’s a derivation of this formula to put it into a form that’s easier to manage and it basically turns into this
1/Uniform (0,1)
distribution which is just one over a random decimal from 0 to 1. A cool property about this distribution is that for any multiplier, the probability that this multiplier is less than some value X is actually about 1 – 1 / X so the probability that the multiplier is less than 2 is about one-half, the probability that it is less than 10 is about 90% and so on. This is also the reason why there is almost no limit to how high the multiplier can go, which is very unusual for other casino games.
(I simplified a bit so the formula isn’t completely equal, but I found that using this formula here was actually off by a couple decimal places so I’m going to use the above formula instead just so we can get more accurate results.)
So we have this 3% chance of the game crashes instantly and then we have the 97% chance that we use this formula up here. You can see that we have the .01 and this .99 here and lastly, since we found this property for 1 over the uniform 01 distribution we can just plug this 1 – 1 / X in right here.
I’ve coded this formula into Python, and we’re going to test it against real results to see if we have an accurate formula.
Let’s try with a multiplier of 2 and we can see that the real results had 52% of results less than 2 and now when we use our formula we get 52% as well.
We can try it with a higher number such as 10, and we can see that about 90.4% of results were less than 10 and we get the same thing from the formula and I will try it for 100 and we can see that that matches and I will try a small number like 1.01 and we can see that should be about 4.9% and it looks like that matches as well.
Now we can calculate the expected value of a $1 bet on multiplier X. All we really need to do is take the probability of losing and multiply it by the negative $1 that we would be losing, and then we take the probability of winning, which is just one minus is the probability of losing, and we’re going to multiply this by the multiplier -1.
For example if our multiplier is 2, we would be winning $1. Now let’s see how accurate our expected value formula is. We can see that with the multiplier of 2, the expected loss per game is about three and a half cents and based on the results from the actual games we get about three and a half cents as well.
Let’s change the multiplier to something smaller like 1.05. Now we’re getting a loss of about 3.1 cents and when we look at the results from the actual games we also get a loss of about 3.1.
Here I plotted the expected value by multiplier in the blue line is the theoretical expected value based off of our formula and the orange line is actually based on the results of the game that we collected.
We can see that they follow each other pretty well and we can also see that everything is in this range of losing about 3 to 4% of the bet. We can also see that the expected loss is less when we’re betting lower multipliers around 1 to 2. I’m only losing about 3% but as the multiplier starts to increase that’s when the loss goes to about 4%.
So this graph here shows why it’s not going to be possible to beat this game in the long term because there’s no way to turn these negative expected value bets into something that has a positive expected value.
One way the people try to beat Crash Games is using what’s known as the Martingale strategy which is basically doubling your bet every time you lose to try to make up for that money. Or in this case doubling your bet every time it crashes below 2. We can see the total bets here increasing each time that the multiplier crashes below 2 and it eventually reaches 1500, so it looks like people are using the strategy and it would work if you had an infinite bank roll but unfortunately there’s a max profit of 10000 on most of these websites. So I found the probability of losing each amount of games in a row and I put them all into this spreadsheet.
Starting with the two dollar bet you can see here we’re doubling it each time that we would lose and the total wagered is just the sum of all the bets so far. Each time you can see that the potential win is exactly $2 more than the total amount that we wagered and here we have the probability of losing this many games in a row.
To calculate the expected value we take
-1 * (total amount that we wagered) * (the probability of losing our total wager) + (the total profit) * 1 – (the probability of losing)
This will give us our expected value. We can see that they are all going to be negative so this strategy has a high probability of winning a small amount of money and a low probability of losing a large amount of money.