> For the complete documentation index, see [llms.txt](https://docs.takara.gg/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.takara.gg/controls-and-safety/parameters.md).

# Parameters

Every tunable value, its deploy setting, its hard bound, and who can change it.\
All of it reads from the deployed contracts — verify any of them yourself.

## Fees

| Parameter                         |          Deploy |   Hard cap | Setter |
| --------------------------------- | --------------: | ---------: | ------ |
| `protocolFeeBps`                  | **250** (2.50%) |   500 (5%) | Owner  |
| `jackpotFeeBps`                   |  **50** (0.50%) |   200 (2%) | Owner  |
| `ChestFeeBps` (Golden Chest feed) | **100** (1.00%) |   300 (3%) | Owner  |
| `consignFeeBps`                   | **200** (2.00%) |   300 (3%) | Owner  |
| `consignPayoutFeeBps`             | **225** (2.25%) | 1000 (10%) | Owner  |

{% hint style="info" %}
All five are frozen while any spin is in flight.
{% endhint %}

## Prize table

| Parameter           |            Deploy | Constraint                      |
| ------------------- | ----------------: | ------------------------------- |
| `tableRtpBps`       | **8949** (89.49%) | must land in 8000–9700 (80–97%) |
| `maxFaceBps`        | **88800** (8.88×) | ≤ 100000 (10×)                  |
| Worst tier face     |      7000 (0.70×) | ≥ 5000 (0.50×)                  |
| Jackpot probability | **5 bps** (0.05%) | ≤ 20 bps (0.20%)                |
| Tier count          |             **6** | 2 – 16                          |

`setTable` recomputes RTP from the probabilities and faces supplied and reverts if the result falls outside the band. It also requires **every rack empty** and no spin in flight.

## Buyback

| Parameter          |              Deploy |        Range | Setter |
| ------------------ | ------------------: | -----------: | ------ |
| `buybackSpreadBps` |     **250** (2.50%) | ≤ 1000 (10%) | Owner  |
| `buybackWindow`    | **172800** (2 days) |  1 – 30 days | Owner  |

The spread is charged on the **actual sale proceeds** — `sellBack` sells the card's stock on Uniswap V3; it does not pay a frozen face out of the vault.

## Bankroll vault

| Parameter       |         Deploy |        Range | Setter |
| --------------- | -------------: | -----------: | ------ |
| `depositLockup` |   **0** (none) |    ≤ 30 days | Owner  |
| `withdrawDelay` | **3600** (1 h) | 1 h – 7 days | Owner  |

## Golden Chest

| Parameter        |                         Deploy | Setter |
| ---------------- | -----------------------------: | ------ |
| `chestThreshold` | **10,000 USDG** of spin volume | Owner  |
| `chestFund`      |    accrues at 1% of every spin | —      |

## Randomness

| Parameter     | Value                                                                     |
| ------------- | ------------------------------------------------------------------------- |
| Provider      | **VRF** — `CommitRevealAdapter` (commit-reveal hash chain)                |
| Per-spin fee  | **0** — the operator pays reveal gas from protocol fees                   |
| `rescueDelay` | **172800** (48 h) before a stuck spin is refundable (bounds 6 h – 7 days) |

The provider is swappable by the owner via `setRandomness`, but **not while a spin is in flight**.

## Packs

| Pack |        Price | Reserved per in-flight spin | Enabled |
| ---- | -----------: | --------------------------: | ------- |
| 0    |  **10 USDG** |                  88.80 USDG | ✅       |
| 1    | **100 USDG** |                    888 USDG | ✅       |
| 2    |    1000 USDG |                  8,880 USDG | ❌       |

The reservation is `price × maxFaceBps` (the worst-case fallback face). Pack 2 stays off until the bankroll can cover its reservation — an enabled pack the vault cannot back reverts inside `BankrollVault.reserve`.

## Batching

| Parameter   | Value                                 |
| ----------- | ------------------------------------- |
| `MAX_BATCH` | **5** spins per signature (ZapRouter) |

Each spin in a batch gets its own randomness request, its own reservation, and its own independent settlement. A batch is N spins bought together, not one spin with N outcomes.

## Swap routing

Per-pair Uniswap V3 fee tiers, pinned at deploy via `setPairFee`. Measured on mainnet, 2026-08-26:

| Pair        |         Fee tier |     Depth quoted |
| ----------- | ---------------: | ---------------: |
| USDG / WETH |  **100** (0.01%) |     \~1,016 WETH |
| USDG / SPY  |  **500** (0.05%) |    \~23,053 USDG |
| USDG / TSLA | **3000** (0.30%) |    \~63,146 USDG |
| USDG / NVDA |  **500** (0.05%) | \~1,359,445 USDG |
| USDG / MSFT | **3000** (0.30%) |    \~26,650 USDG |
| USDG / SPCX |  **500** (0.05%) |   \~588,281 USDG |

{% hint style="warning" %}
The adapter defaults every pair to 0.30%, which is wrong for several of these — NVDA's and SPCX's real depth is in the 0.05% pool, and TSLA's 0.05% pool is empty. So the tiers are set explicitly at deploy, not left to the default.
{% endhint %}

***

## Values that can never change

`constant` in the bytecode. No transaction can alter them; changing one means deploying a new contract at a new address.

```solidity
// Machine
PROTOCOL_FEE_CAP_BPS       = 500      // 5%
JACKPOT_FEE_CAP_BPS        = 200      // 2%
EGG_FEE_CAP_BPS            = 300      // 3%  (Golden Chest feed)
CONSIGN_FEE_CAP_BPS        = 300      // 3%
CONSIGN_PAYOUT_FEE_CAP_BPS = 1000     // 10%
BUYBACK_SPREAD_CAP_BPS     = 1000     // 10%
RTP_MIN_BPS                = 8000     // 80%
RTP_MAX_BPS                = 9700     // 97%
FACE_FLOOR_BPS             = 5000     // worst tier keeps ≥ 50%
FACE_CAP_BPS               = 100000   // no face above 10×
JACKPOT_PROB_CAP_BPS       = 20       // ≤ 0.20%
MIN_BUYBACK_WINDOW         = 1 days
MAX_BUYBACK_WINDOW         = 30 days
MIN_RESCUE_DELAY           = 6 hours
MAX_RESCUE_DELAY           = 7 days
MAX_TIERS                  = 16
MAX_POOL                   = 32       // stocks per tier
MAX_RESTOCK_COUNT          = 50
PACK_PRICE_CAP             = 1e24

// BankrollVault
MIN_DELAY                  = 1 hours
MAX_DELAY                  = 7 days
MAX_LOCKUP                 = 30 days

// ZapRouter
MAX_BATCH                  = 10
```


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.takara.gg/controls-and-safety/parameters.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
