> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fade.finance/llms.txt
> Use this file to discover all available pages before exploring further.

# Games

> The studio ships the game and its paytable. Fade is the bank behind it, from the first player.

Fade does not ship games. It ships one primitive, a draw from a distribution the app writes, and the distribution is the game. A slot, a loot box, a coin flip, an instant-win ticket and a crash round with a preset cash-out are the same instruction with different numbers in the paytable.

## Two laws shape every game

**The expectation law: win rate and multiplier are one dial.** For a win-or-nothing game, `win rate = (1 − edge) / multiplier`. At a 3.5 % edge:

| Top multiplier | Win rate |
| - | - |
| 1.1× | 87.73 % |
| 2× | 48.25 % |
| 10× | 9.65 % |
| 100× | 0.965 % |
| 1 000× | 0.0965 % |

A high win rate costs nothing in capital.

**The capital law: only the top prize costs money.** The pool reserves the worst case, `stake × top multiplier − pool credit`, and the per-wager cap bounds it. Nothing else in the paytable enters the cap. A game that pays out 90 % of the time can be trivial for the pool to carry; a 1 000× jackpot needs a large pool.

## Worked paytables

All at a 3.5 % declared edge, so `Σ p·m = 0.965`.

<AccordionGroup>
  <Accordion title="Loot box: every box pays something">
    | Tier | Probability | Multiplier | Contribution |
    | - | - | - | - |
    | Common | 60 % | 0.60× | 0.360 |
    | Uncommon | 25 % | 1.20× | 0.300 |
    | Rare | 12 % | 1.80× | 0.216 |
    | Epic | 2.5 % | 2.50× | 0.0625 |
    | Mythic | 0.5 % | 5.30× | 0.0265 |

    The common tier must return less than the stake. If every outcome paid 1× or more, the expected return would exceed 1 and `open_wager` would refuse the paytable.
  </Accordion>

  <Accordion title="Slot with a jackpot: frequent hits and a rare 100×">
    | Outcome | Probability | Multiplier | Contribution |
    | - | - | - | - |
    | Jackpot | 0.5 % | 100× | 0.500 |
    | Money back | 46.5 % | 1.00× | 0.465 |
    | Nothing | 53 % | 0× | 0 |

    Half the expected-value budget goes to the jackpot; the rest buys a 47 % hit rate.
  </Accordion>

  <Accordion title="Jackpot demo: five outcomes">
    The devnet demo's paytable, as the program stores it:

    | Outcome | `p` | `m` |
    | - | - | - |
    | Jackpot | 30 000 000 | 100 000 (10×) |
    | Double | 100 000 000 | 20 000 (2×) |
    | Plus | 250 000 000 | 12 000 (1.2×) |
    | Half back | 330 000 000 | 5 000 (0.5×) |
    | Nothing | 290 000 000 | 0 |
  </Accordion>

  <Accordion title="Mines, decided up front">
    A 25-cell grid with 3 mines and a player who commits to 5 safe cells: the chance that 5 cells miss all 3 mines is 26 334 / 53 130, about 49.57 %, so a two-bucket paytable at a 3.5 % edge pays up to 1.9469× (`m = 19 469` bps) on that outcome. The interface can still reveal cells one by one, but it animates an outcome already drawn. Crash with a cash-out set before the round is the same construction.
  </Accordion>
</AccordionGroup>

## One wager for a whole round

A wager has one draw, but nothing says it belongs to one player. A studio running rounds (a multiplayer crash, a wheel, a roulette table) can fold every bet of the round into one paytable and open one wager for the total, with itself as beneficiary, then pay its players from the result. Everyone sees the same draw, and one oracle call serves the table. Example, crash at a 1.5 % edge, Alice stakes 10 at a 2× cash-out and Bob 20 at 5×:

| Crash point | Probability | Owed | Multiplier on the 30 stake |
| - | - | - | - |
| below 2× | 50.75 % | 0 | 0 |
| 2× to 5× | 29.55 % | 20 to Alice | 0.6666× |
| 5× or more | 19.70 % | 20 + 100 | 4× |

Limits: at most 32 distinct payouts per round, and players trust the studio to pay them from the result. The studio can make that checkable by publishing the bets behind each round's on-chain paytable.

## What a single draw cannot express

| Not possible | Why | Workaround |
| - | - | - |
| Decisions between reveals (blackjack, mines click by click, crash with a live cash-out) | One draw against a distribution frozen at open, and no callback into the app | Commit the decision up front, or chain wagers (one per click), at the cost of an edge per step |
| More than 32 outcomes | Paytable size limit | Group outcomes that share a multiplier |
| A zero-probability bucket | Refused at open: a prize nobody can hit is a display lie | Do not list it |
| Multipliers above 10 000× | `M_CEILING` | None |
| Progressive jackpots across wagers | Each wager reserves its own worst case | A fixed multiplier sized by the pool |

## Operators and lay-off

An operator that already runs a bankroll can keep every bet its bankroll can carry and route to Fade only the ones it would refuse as too large. It stakes from funds it holds for its players, names itself beneficiary and credits its players. Each routed bet is revenue it would not otherwise have had.

<Warning>
  Games of chance are regulated in most jurisdictions, and prohibited online in some. Fade is infrastructure: the app that offers a game to players is responsible for licences, age and identity checks and geographic restrictions where they apply.
</Warning>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.