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

# Parameters

Every tunable value, its current setting, its hard ceiling, and who can change it. All read from the deployed contracts — verify any of them yourself.

### Fees

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

All five are frozen while any spin is in flight.

### Prize table

| Parameter           | Current           | Constraint             |
| ------------------- | ----------------- | ---------------------- |
| `tableRtpBps`       | **8949** (89.49%) | must land in 8000–9700 |
| `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**             | ≤ 16                   |

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

### Buyback

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

### Bankroll vault

| Parameter       | Current           | Range     | Setter |
| --------------- | ----------------- | --------- | ------ |
| `depositLockup` | **172800** (48 h) | ≤ 30 days | Owner  |
| `withdrawDelay` | **86400** (24 h)  | ≤ 30 days | Owner  |

The lockup is stamped on **every** deposit, so topping up restarts the clock on the whole position.

### Golden egg

| Parameter      | Current                        | Setter |
| -------------- | ------------------------------ | ------ |
| `eggThreshold` | **10,000 USDT** of spin volume | Owner  |
| `eggFund`      | accrues at 1% of every spin    | —      |

### Randomness

| Parameter          | Current                                               |
| ------------------ | ----------------------------------------------------- |
| Provider           | Chainlink VRF v2.5                                    |
| Payment            | native BNB                                            |
| `callbackGasLimit` | 500,000                                               |
| `rescueDelay`      | **172800** (2 days) before a stuck spin is refundable |

The provider can be swapped by the owner, but **not while a spin is in flight**.

### Packs

| Pack | Price         | Reserved per in-flight spin | Enabled |
| ---- | ------------- | --------------------------- | ------- |
| 0    | **8.88 USDT** | 78.85 USDT                  | ✅       |
| 1    | 88 USDT       | 781.44 USDT                 | ✅       |
| 2    | 888 USDT      | 7,885.44 USDT               | ❌       |

Pack 2 are disabled until the bankroll can back their reservations. An enabled pack the vault cannot cover reverts inside `BankrollVault.reserve` with nothing explaining why, so they stay off until the depth is there.

### Batching

| Parameter   | Value                 |
| ----------- | --------------------- |
| `MAX_BATCH` | 5 spins per signature |

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

### Swap routing

| Pair         | Fee tier          | Pool depth       |
| ------------ | ----------------- | ---------------- |
| USDT / WBNB  | **100** (0.01%)   | \~18,700 WBNB    |
| USDT / SPYB  | **100** (0.01%)   | \~289,000 USDT   |
| USDT / TSLAB | **2500** (0.25%)  | \~158,000 USDT   |
| USDT / NVDAB | **2500** (0.25%)  | \~293,000 USDT   |
| USDT / SPCXB | **2500** (0.25%)  | \~1,297,000 USDT |
| USDT / MSFTB | **10000** (1.00%) | \~74,000 USDT    |

Tiers are measured, not guessed. The adapter defaults to 0.25%, which is wrong for several of these — SPYB's real depth sits in the 0.01% pool while its 0.25% pool holds only a few hundred dollars.

***

### Values that can never change

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

```solidity
PROTOCOL_FEE_CAP_BPS       = 500     // 5%
JACKPOT_FEE_CAP_BPS        = 200     // 2%
EGG_FEE_CAP_BPS            = 300     // 3%
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
MAX_LOCKUP                 = 30 days
MAX_TIERS                  = 16
MAX_POOL                   = 32      // stocks per tier
MAX_RESTOCK_COUNT          = 50
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.stoxa.app/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.
