Kelly Strategy bankroll management
Kelly Fractions
The Kelly criterion is a mathematical formula that maximizes the rate of growth of a bankroll by optimizing bet sizes in the face of uncertainty. At Mega Casino, we manage our bankroll by using the Kelly criterion to establish a maximum bet that a player can place on each game—essentially, a bet against our overall bankroll. This maximum bet is determined by calculating the Kelly fraction, which represents the fraction of the current bankroll that can be wagered. Notably, the Kelly fraction varies based on the number of outcomes in a game.
Implementation at Mega Casino
Mega Casino applies a dual approach:
Frontend Calculation: We use a 1x Kelly factor for determining the betting limits presented to players.
Smart Contract Calculation: To safeguard against potential issues caused by fluctuations in the bankroll, our contracts incorporate a 1.1x Kelly factor. This extra margin helps prevent transaction failures due to slight variations in bankroll size.
Application for Two-Outcome Games
For games with only two outcomes, the Kelly criterion is particularly straightforward. Examples of such games include:
Coin Flip: Outcome is heads or tails.
DICE: The outcome is determined by whether the roll is over or under a specified number.
Mines: The outcome is binary—either a mine is found (resulting in a loss) or no mine is found (resulting in a win).
For these two-outcome games, the Kelly criterion specifies that the optimal fraction 𝑥* of the bankroll to wager is given by:
Where:
p is the probability of winning.
1−p is the probability of losing.
b is the net odds received on the wager (i.e., the ratio of net winnings to the amount bet).
Application for Multi-Outcome Games
For games with more than two outcomes, the Kelly criterion does not yield a closed-form solution. Instead, the optimal fraction 𝑥* of the bankroll that should be risked is determined numerically by solving for 𝑥*, this is the formula that is solving for x*:
Where:
N is the total number of outcomes.
p𝑖 is the probability of outcome 𝑖.
b𝑖 is the percentage of the bankroll lost to the player in outcome 𝑖.
Practical Implementation
At Mega Casino, the Kelly criterion is used to dynamically adjust the maximum bet a player can place against our bankroll. In practice, the following considerations apply:
In our implementation:
Frontend Calculation: We use a 1x Kelly factor when displaying the maximum wager to the player.
Smart Contract Calculation: We incorporate a 1.1x Kelly factor within our contracts. This slight increase is designed to prevent transaction failures due to small fluctuations in the bankroll size.
In practice, there will be minor deviations from these factors due to two primary situations:
An individual player's maximum Kelly wager multi-bets.
Multiple players (or wallets) placing their maximum Kelly wagers simultaneously (within approximately a 30-second window, depending on VRF response times).
If these high-risk bets are consistently lost, the effective Kelly fraction decreases, and the bankroll assumes slightly less risk. Conversely, if players are winning, the effective Kelly fraction increases, allowing the bankroll to take on slightly more risk. However, it is nearly impossible for the bankroll to reach a state where the effective Kelly factor exceeds 2x, a zone in which the long-term growth rate becomes negative.
Probability Examples for Reaching 2x+ Kelly
To illustrate the unlikelihood of reaching the 2x Kelly threshold, we define:
B: Current bankroll balance.
k: The Kelly fraction for a particular game.
M: Maximum payout multiplier for that game.
If a player wins the maximum payout multiplier 𝑀 M consecutively 𝑛 n times, the bankroll changes by an amount proportional to the losses incurred by the wager size. The new bankroll becomes:
Consequently, the optimal Kelly wager recalculates as:
If a player continues to wager 𝑘𝐵 (their original Kelly wager), the relative error in the wager can be expressed as:
If we require that this error factor does not exceed 2 (i.e., staying below a 2x Kelly zone), we derive that the number of consecutive wins needed to exceed the 2x threshold is:
Example 1: Coin Flip
Parameters: Kelly fraction k≈0.010204082 Maximum payout multiplier M≈1.98 Probability p=0.5
A player would need:
The probability of this occurring is:
This is extremely unlikely.
Example 2: DICE (Maximum Multiplier)
Parameters: Kelly fraction k≈0.00001011 Maximum payout multiplier M≈990 Probability p=0.001
Again:
The probability is:
This outcome is practically impossible.
Example 3: DICE (Minimum Multiplier)
Parameters: Kelly fraction k≈0.2375 Maximum payout multiplier M≈1.0421 Probability p=0.95
Here, the calculation yields:
Although the probability in this scenario is around 9.45%, reaching 46 consecutive wins would require the player to wager approximately 10.925 10.925 times their entire bankroll—a risk level that is practically unachievable.
Conclusion
In summary, Kelly-based wagers are designed to optimize long-term growth. Although short-term deviations may occur—such as when individual players or groups place max Kelly wagers simultaneously—these events are transient. The probabilities of reaching a 2x or greater effective Kelly zone, where the growth rate turns negative, are extremely low. Should such a situation occur, it would be only temporary, as the bankroll will have already grown significantly, and the impact of any losses would be minimal.
Mega Casino’s implementation of the Kelly criterion—using a 1x factor on the frontend and a 1.1x factor in contracts—ensures that our system remains robust over time. The potential negative impacts of transient deviations are negligible, ensuring the long-term stability and growth of our bankroll.
Summary
Kelly Criterion Overview: Mega Casino uses the Kelly criterion to determine the optimal fraction of the bankroll to risk on each wager, maximizing long-term growth by carefully sizing bets.
Implementation Strategy:
On the frontend, a 1x Kelly factor is used to display maximum wager limits.
In the smart contracts, a 1.1x Kelly factor is applied to account for fluctuations in the bankroll, reducing the risk of transaction failures.
Application to Different Games:
For games with two outcomes (like coin flip, dice, and mines), the optimal betting fraction is straightforward.
For games with multiple outcomes, the optimal fraction is computed numerically using a more complex version of the Kelly criterion.
Dynamic Adjustments: Minor deviations occur when individual players or multiple players place their maximum wagers simultaneously. If these wagers lose, the effective Kelly fraction decreases, meaning the bankroll assumes slightly less risk. Conversely, if these wagers win, the effective Kelly fraction increases, allowing the bankroll to take on more risk temporarily.
Risk of Reaching 2x Kelly: It is nearly impossible for the bankroll to reach or sustain a 2x effective Kelly level, where the growth rate would become negative. Such a scenario would require an implausible streak of consecutive maximum wins, which is extremely unlikely.
Overall Impact: The long-term impact of any transient deviations from the ideal Kelly fraction is negligible. The strategy ensures that the bankroll remains robust and grows sustainably over time, balancing risk and reward effectively.
Last updated