> 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/roles.md).

# Roles

Who can call what. Five roles, and only two of them are privileged.

***

### Player

Anyone. No registration, no allowlist, no token to hold first.

| Can                                |                                                            |
| ---------------------------------- | ---------------------------------------------------------- |
| `spinWithBNB` / `spinBatchWithBNB` | Buy a spin, or up to 10 in one signature                   |
| `sellBackForBNB`                   | Sell a won card back within its window                     |
| `unwrap`                           | Burn a card, take the stock. **Cannot be blocked**         |
| `split`                            | Carve shares out of a card (voids the face, permanently)   |
| `consign` / `unconsign`            | Lend a won card to the machine and take it back            |
| `claim`                            | Sweep USDT credits to any address                          |
| `cancelSpin`                       | Refund a spin whose randomness never arrived, after 2 days |

`cancelSpin` and `flushConsignments` are **permissionless,** anyone can call them for anyone. They only ever help, so there is no reason to gate them.

***

### Liquidity provider

Anyone who deposits into the bankroll vault.

| Can               |                                                     |
| ----------------- | --------------------------------------------------- |
| `deposit`         | Add USDT, receive shares                            |
| `requestWithdraw` | Start an exit after the 48 h lockup                 |
| `cancelWithdraw`  | Change your mind                                    |
| `executeWithdraw` | Take the assets after the 24 h delay, priced at NAV |

An LP has no say in the prize table, the fees, or which stocks are racked.

***

### Consignor

Any player who has lent a card back to the machine. Not a permission but a state.

| Can             |                                                                |
| --------------- | -------------------------------------------------------------- |
| `unconsign`     | Reclaim your card plus accrued fees, when no spin is in flight |
| `consignEarned` | Read what it has earned so far                                 |

***

### Restocker

An operational hot key. Currently the same address as the owner; it will be split onto its own wallet once restocking is automated.

| Can           |                                                               |
| ------------- | ------------------------------------------------------------- |
| `restock`     | Buy cards with vault USDT and put them on a rack              |
| `unrack`      | Sell a card back to USDT and return the proceeds to the vault |
| `rerack`      | Put a bought-back card back on its shelf                      |
| `growJackpot` | Swap the jackpot fund into the jackpot card                   |

**The risk this key carries:** `restock` and `growJackpot` set their own swap slippage. A compromised restocker could grief the vault through deliberately bad fills. It cannot withdraw anything, the money only ever moves from vault to inventory, but it can degrade the inventory's value. Racks are kept shallow to bound the damage.

`unrack` and `rerack` additionally require **zero spins in flight**, because changing a rack's length mid-flight would shift the draw.

***

### Owner

The most privileged role, and still cannot reach user funds.

| Can                                      | Constraint                                              |
| ---------------------------------------- | ------------------------------------------------------- |
| `setFees`                                | Within the hard caps; blocked while a spin is in flight |
| `setTable`                               | RTP must land in 80–97%; **every rack must be empty**   |
| `setPacks` / `setPackEnabled`            | —                                                       |
| `setBuybackSpread` / `setBuybackWindow`  | Within caps                                             |
| `setConsignFee` / `setConsignPayoutFee`  | Within caps                                             |
| `listToken` (wrapper)                    | Add a prize stock                                       |
| `addStockToTier` / `removeStockFromTier` | Permit a stock on a tier                                |
| `setPairFee` (adapter)                   | Choose a swap pool                                      |
| `setRestocker`                           | Rotate the operational key                              |
| `setRandomness`                          | Blocked while a spin is in flight                       |
| `setPaused`                              | Stops **new spins only**                                |
| `setDepositLockup` / `setWithdrawDelay`  | ≤ 30 days                                               |
| `transferOwnership`                      | Two-step; the recipient must accept                     |

#### What the owner cannot do

There is no function for any of these.

* Withdraw from the bankroll vault
* Take player credits
* Touch the jackpot fund or the golden egg fund
* Block a card from being unwrapped
* Change the odds a pending spin will settle under
* Set RTP below 80% or jackpot odds above 0.20%
* Mint a card without paying for it

***

### The machine itself

`BankrollVault` gates four functions to `onlyMachine`:

|           |                                                        |
| --------- | ------------------------------------------------------ |
| `reserve` | Lock the worst-case payout before a spin is accepted   |
| `settle`  | Release a reservation, take revenue, pay a fallback    |
| `draw`    | Pull unreserved USDT to buy inventory or pay a buyback |

`draw` can only ever take from `available()` assets not spoken for by in-flight spins. A pending payout is untouchable by anything, including the machine.

***


---

# 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/roles.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.
