> For the complete documentation index, see [llms.txt](https://visionstore.gitbook.io/visionstore-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://visionstore.gitbook.io/visionstore-docs/scripts/boxing-creator/configuration/money-bets-ratings.md).

# Money, bets and ratings

Purses, spectator betting, house cuts, and the Elo rating with tiers.

{% hint style="success" %}
**All money is handled by the server.** Bets and purses are taken when they're placed and paid out when the fight ends. If the resource or the server stops mid-fight, everything still at stake is **refunded**.
{% endhint %}

## Purse

Each fighter puts up the same amount and the winner takes both. Fighters choose it in the lobby, up to the ring's `maxPurse`.

```lua
Config.Purse = {
    Enabled = true,
    Steps = { 0, 500, 1000, 2500, 5000, 10000, 25000, 50000 },  -- choices in the lobby
    HouseCut = 0.0,     -- share taken from the loser's stake (0.1 = 10%)
    Account = 'cash',   -- 'cash' | 'bank'
}
```

A draw or no contest gives each fighter their purse back.

## Spectator betting

When both fighters are ready, a **betting window** opens for everyone near the ring before the walk-out. It's a shared pool (parimutuel): winners split the losing side's pool in proportion to their stake, and the menu shows live odds.

```lua
Config.Betting = {
    Enabled = true,
    Window = 30,              -- seconds
    Min = 100,
    Max = 50000,              -- per player, per fight
    HouseCut = 0.05,          -- 5% of the losing pool goes to the house
    FightersOnlyOnSelf = true,-- fighters may only bet on themselves
    Account = 'cash',
}
```

Each ring can turn bets off in the creator. Fighters can also turn them off for their fight in the lobby.

{% hint style="info" %}
**ESX:** `'cash'` means the `money` account. **Standalone:** there is no money system; turn these off or connect your economy in `bridge/sv_bridge.lua`.
{% endhint %}

## Records and rating

Every fight updates both fighters' records: wins, losses, draws, KOs, knockdowns, punches landed, damage, earnings, streaks and an **Elo rating**.

```lua
Config.Rating = {
    Start = 1000,     -- starting rating
    K = 32,           -- how fast ratings move
    Tiers = {
        { 0, 'rookie' },
        { 900, 'amateur' },
        { 1050, 'contender' },
        { 1200, 'pro' },
        { 1350, 'elite' },
        { 1500, 'champion' },
    },
    Leaderboard = 10, -- rows on the leaderboard tab
}
```

Tier names come from the locale files (`tier.rookie`, `tier.champion`...), so you can rename them there. Records are stored in the `chapo_boxing_stats` table.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://visionstore.gitbook.io/visionstore-docs/scripts/boxing-creator/configuration/money-bets-ratings.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
