Unlike traditional casino games like slots or card games, or even newer games like Plinko, Crash offers a thrilling opportunity for players to win big payouts - up to 500x and even as high as 20,000x their bet amount.
Crash stands out in the gambling world due to its distinctive probability distribution. Most casino games have fixed odds, predictable patterns, or capped multipliers. In contrast, Crash introduces a dynamic scale of potential outcomes, where the adrenaline-pumping possibility of hitting extraordinary multipliers exists every single round. This mechanism often causes players to intentionally wait for a certain multiplier before cashing out. Cashing out too early is another situation players might find themselves in, where they might watch the multiplier go up to a 1000x when they cashed out at 2x, causing them to FOMO in even harder the next game as they believe they can keep chasing a certain outcome. This is what makes Crash unique.
The thrill of the Crash game comes from its unpredictable nature and the potential for significant multipliers. Our algorithm is based on an exponential decay model, which determines the point at which the game "crashes" or ends. This model is characterized by the following key aspects:
When a new game starts, a random number is generated. This randomness value is used as a seed in the calculation of the crash point.

The crash point is a critical aspect of the game as it determines when the multiplier stops increasing. The crash point is calculated using a combination of randomness and secret hashes to ensure fairness and unpredictability. The crash point is determined by combining the randomness with a secret provided by the house:

The randomness is converted to a string and concatenated with the house_secret (a string provided by the house and known only to the house until the game ends). This combined string is then hashed using the SHA-3 256-bit hash function.
The hash value is then used to determine the crash point:

The `parse_hex` function converts the hash (a hexadecimal value) to a numerical value. If the numerical value modulo 33 equals 0, the crash point is set to 0, indicating an immediate crash. Otherwise, the first 7 bytes of the hash are used to calculate the crash point. This value is converted to a 64-bit unsigned integer and processed through the formula:
This formula ensures a crash point greater than 1. If the result is exactly 1, it is adjusted to 0 to avoid ambiguity.
The probability distribution of crash points in the game of Crash is what sets it apart from other casino games. This distribution is continuous and heavily skewed, following an exponential decay pattern. Here's a breakdown of this unique distribution:
Frequent Low Multipliers: The majority of crash points occur at lower multipliers (1-2x). This creates a sense of regular, smaller wins that keep players engaged.
Decreasing Probability for Higher Multipliers: As the multiplier increases, the probability of the crash increases exponentially. This means that while it's common to see multipliers like 2x or 3x, it becomes increasingly rare to witness multipliers of 10x, 100x, or higher.
Rare but Possible Extreme Events: What makes Crash truly exciting is the mathematical possibility of extremely high multipliers. Events like a 500x or even a 20,000x multiplier are rare but not impossible. These rare events create FOMO, with many users prematurely cashing out at 10x, only to watch the multiplier soar to 500x. This often leaves them regretting their decision and wishing they had the will to hold on longer.
Continuous Nature: Unlike many gambling games with discrete outcomes, Crash offers a continuous distribution of possible results. This smooth curve of probabilities allows for a wide range of strategies and risk preferences among players.
Long-Tail Distribution: The distribution exhibits a "long tail," meaning that while extremely high multipliers are rare, they do occur occasionally, contributing significantly to the game's expected value and player excitement.

This graph illustrates the probability distribution of crash points. Notice how the probability drops sharply as the multiplier increases, but never quite reaches zero, allowing for those rare, extremely high multiplier events. It's this unique probability distribution that allows Crash to offer the potential for massive wins while still maintaining a predictable house edge over the long run.
Players place bets and can cash out at any multiplier before the crash point.
When a player places a bet:

The player's address and bet amount are recorded. The `cash_out` option is initially set to none.
Players can choose to cash out before the crash point:

The player's cash-out multiplier is recorded. Players cannot cash out more than once per game.
After the crash point is revealed, winnings are calculated based on whether the player cashed out before the crash.
Winnings are calculated using the player's bet amount and cash-out multiplier:

If the player did not cash out, winnings are 0. If the player cashed out before the crash point, winnings are calculated as:
To calculate the house edge, let's break down the expected value (EV) of a player's bet. We'll consider the probability distribution of crash points and the resulting payouts.
From the code, we see that the crash point is immediately set to 0 (resulting in a loss) if the hash value modulo 33 equals 0:

This means the probability of an immediate crash is:
The EV of a bet can be calculated as:
where is the probability of the multiplier and is the expected payout if the crash occurs at .
Given that players typically aim to cash out at a multiplier that offers them a safe return while accounting for the risk of crashing, the payout can be simplified to:
However, since the probability decreases as increases, we need to factor this into our calculation.
Assuming the average cash out multiplier (a safe multiplier players typically aim for), we can estimate the EV with consideration of an immediate crash:
The house edge is the difference between the player's original bet and the EV:
If the average multiplier that players cash out at is 1.5x (assuming players aim for a 50% return on their bet before cashing out), the house edge would be:
To understand the implications of the unique game design of Crash, we need to go beyond mathematical modeling and examine the real world behavior of players. This is why we conducted simulations based on the data from the Zion Bets testnet. Our goal was to quantify profitability for gamblers as well as the house (a.k.a Liquidity Providers). We did this by:
Analyzing player behavior patterns from the testnet data, including betting amounts, cash out points, and game frequency.
Extrapolating this data to create a larger, more diverse sample size that maintains the characteristics of real player behavior:
70% of players cash out between 1.1x and 2x multiplier.
25% of players cash out between 2x and 5x multiplier.
5% of players aim for high multipliers, cashing out between 5x and 20x.
Implementing a Python simulation that incorporates these behavioral patterns and the core game mechanics, including the 3.03% chance of immediate crash.
Running thousands of simulated games with parameters calibrated to match observed player behaviors, allowing us to explore a wide range of scenarios.
Calculating key metrics such as Return to Player (RTP) percentage, house edge, average profit per game, and potential Annual Percentage Yield (APY) for liquidity providers.
Visualizing the results to provide clear insights into the game's performance over time and under various conditions.
These simulations help us answer common questions that both players and potential investors might have:
Is the Crash game actually profitable for the house in the long run?
How often do players win?
What happens if a player hits a massive multiplier? Can the house cover big wins?
As an investor, what kind of returns can I expect if I provide liquidity to the game?
How long does it typically take for the house to become profitable?
Can skilled players beat the house edge in Crash?

The Return to Player (RTP) percentage is a crucial metric in gambling games, representing the proportion of wagers that players can expect to receive back over time. Our simulation results show a theoretical RTP of 94.78%, with a corresponding house edge of 5.22%.
The RTP is calculated as follows:
\text{RTP} = \text{100%} - \text{House Edge}
This high RTP of 94.78% ensures that players have a fair chance of winning, while the house maintains a slight edge to ensure long term profitability. It's important to note that this is a theoretical value based on the average cash out multiplier observed in our simulations. Actual results may vary in the short term due to individual player strategies.

This histogram shows the distribution of house profits across individual games. The x-axis represents profit (or loss) per game, with the zero point in the middle. Bars to the left of zero indicate games where the house paid out to winners, while bars to the right represent profitable games for the house.
Key observations:
The red dotted line shows an average profit of $160.88 per game.
There's a wide distribution of outcomes, reflecting the game's volatility.
Despite frequent payouts to players (losses for the house), the overall volume of profitable games ensures a positive average profit.
This distribution aligns with the theoretical model of Crash, demonstrating how the house can maintain profitability while still offering winning opportunities to players.

This dual-axis line chart visualizes of the house’s long term profitability and potential returns for liquidity providers.
The green line represents the Annual Percentage Yield (APY) for liquidity providers, while the red line shows the cumulative profit over time. Key insights from this graph include:
Initial Volatility: In the early stages, the house may experience some losses, reflected in the negative cumulative profit and fluctuating APY.
Trend Towards Profitability: As more games are played and the law of large numbers comes into play, the cumulative profit line trends upward, demonstrating the house's long term advantage.
Stabilizing APY: While the APY line is volatile early on, it tends to stabilize over time. In this simulation, it settles around 41.60%, indicating attractive potential returns for liquidity providers.
Volume Impact: The chart suggests that increased game and betting volume is directly correlated to more predictable returns.
Liquidity: The volatility in house P&L shows the importance of sufficient liquidity to absorb short term fluctuations.
Our comprehensive analysis of the Crash game, powered by simulation and real world data from the Zion Bets testnet, reveals a gaming model that balances player satisfaction with house profitability. The unique probability distribution of Crash, together with its high RTP and potential for large payout multipliers, makes it an attractive option for both players and investors in the GambleFi sector.
The simulation code used to generate these insights is available on our GitHub:
https://github.com/SeamMoney/zionbets/blob/main/simulations.py
As we prepare for mainnet launch on the Aptos blockchain, we are committed to providing ongoing data analysis and listening to player feedback. The Crash game represents not just an exciting gambling experience, but a new frontier in onchain casino games.

