> For the complete documentation index, see [llms.txt](https://toyland-1.gitbook.io/toyland/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://toyland-1.gitbook.io/toyland/bankroll-management.md).

# Bankroll Management

#### **Kelly based bankroll management** <a href="#kelly-based-bankroll-management" id="kelly-based-bankroll-management"></a>

Toyland employs the Kelly Criterion to manage bankroll effectively and ensure optimal betting strategies for users. This sophisticated approach balances risk and reward while maintaining the platform's long-term sustainability.

#### **How Kelly Criterion Is Applied** <a href="#how-kelly-criterion-is-applied" id="how-kelly-criterion-is-applied"></a>

* **Frontend and Contracts:**
  * Toyland uses 1x Kelly on the frontend to calculate maximum bet sizes.
  * In the contracts, 1.1x Kelly is applied to account for potential transaction fluctuations caused by changes in bankroll size.
* **Adjustments for Specific Scenarios:**
  * Multibets: When individual users place maximum Kelly wagers on multibets, there is a slight deviation from the standard calculation.
  * Simultaneous Bets: If multiple users place maximum Kelly wagers within a 30-second window (validated by Chainlink VRF), adjustments are made to account for potential risks.
* In these scenarios, if losses occur, the Kelly Criterion adjusts to assume a lower risk, thereby protecting the bankroll. Conversely, during winning streaks, the bankroll assumes slightly higher risk as the Kelly factor increases.

<figure><img src="/files/LfP4wY3dyBP8BkotO9EU" alt=""><figcaption></figcaption></figure>

#### Optimal Kelly Betting Fractions <a href="#optimal-kelly-betting-fractions" id="optimal-kelly-betting-fractions"></a>

* The Kelly Criterion ensures the optimal fraction of the bankroll is wagered to maximize long-term growth while minimizing the risk of ruin. The strategy avoids the pitfalls of overbetting (e.g., 2x+ Kelly) and ensures stability:
* Negative Growth Risk:
  * Reaching the negative growth zone (2x+ Kelly) is extremely improbable. It would require a highly unlikely streak of maximum wager wins, hitting maximum multipliers, or excessive spending.
  * Even if such a scenario occurred, the impact would be temporary, as Toyland’s bankroll would have already grown significantly, keeping it above the initial value.
* Short-Term vs. Long-Term Impact:
  * In rare cases where 2x+ Kelly bets are accepted, short-term effects are not necessarily harmful. However, sustained negative growth from such bets could pose a long-term risk.

#### Why Kelly Works for Toyland <a href="#why-kelly-works-for-luckybit" id="why-kelly-works-for-luckybit"></a>

* **Built-In Safety Margin:** The use of 1.1x Kelly in contracts introduces a buffer that accounts for fluctuations, making the strategy safer than a pure Kelly application.
* **House Edge Advantage:** The inherent house edge further reduces risk, ensuring the bankroll grows steadily over time.
* **Average Bet Size:** Most users wager below the maximum calculated bet size, adding an additional layer of safety.

#### Balancing Risk and Growth <a href="#balancing-risk-and-growth" id="balancing-risk-and-growth"></a>

* Toyland’s application of the Kelly Criterion dynamically adjusts the bankroll's risk profile based on outcomes:
  * **When Losing:** Kelly decreases, reducing exposure and preserving the bankroll.
  * **When Winning:** Kelly increases, allowing for slightly higher risk and greater potential growth.
* By maintaining this balance, Toyland ensures a robust and sustainable betting ecosystem while offering users an engaging experience.
