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

# Roles

Who can call what. Most of the surface is permissionless; the privileged keys are few, and none of them can reach user funds.

***

## Player

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

| Can                                |                                                                        |
| ---------------------------------- | ---------------------------------------------------------------------- |
| `spinWithETH` / `spinBatchWithETH` | Buy a spin, or up to 5 in one signature (ZapRouter)                    |
| `sellBackForETH`                   | Sell a won card back within its window (ZapRouter)                     |
| `unwrap`                           | Burn a card, take the stock. **Cannot be blocked** (StockWrapper)      |
| `split`                            | Carve shares out of a card — voids the face permanently (StockWrapper) |
| `consign` / `unconsign`            | Lend a won card to the machine and take it back                        |
| `claim`                            | Sweep USDG credits to any address                                      |
| `cancelSpin`                       | Refund a spin whose randomness never arrived, after `rescueDelay`      |

`cancelSpin`, `flushConsignments`, `fundJackpot`, `fundEgg` and the adapter's `redeliver` are **permissionless** — anyone can call them for anyone. They only ever help, so there's no reason to gate them.

***

## Liquidity provider

Anyone who deposits into the Bankroll Vault.

| Can               |                                                  |
| ----------------- | ------------------------------------------------ |
| `deposit`         | Add USDG, receive shares                         |
| `requestWithdraw` | Start an exit (after the deposit lockup, if any) |
| `cancelWithdraw`  | Change your mind                                 |
| `executeWithdraw` | Take the assets after the 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 — 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** that stocks the racks. Money-in only.

| Can           |                                                  |
| ------------- | ------------------------------------------------ |
| `restock`     | Buy cards with vault USDG and put them on a rack |
| `growJackpot` | Swap the jackpot fund into the jackpot card      |

Both take swap parameters (`minOut`, `deadline`). A leaked restocker key can **grief the vault through deliberately bad fills** — it cannot withdraw anything (money only moves from vault to inventory), but it can degrade inventory value. Run it from a secured signer, and keep racks shallow to bound the damage.

***

## Revealer

The **house-VRF operator key**. Gas-only.

| Can                     |                                                           |
| ----------------------- | --------------------------------------------------------- |
| `reveal` / `revealMany` | Publish the next preimage(s) on the `CommitRevealAdapter` |

Every future word is pinned by the commitment already on chain, so the revealer **can delay a reveal but can never choose an outcome**. Withholding is loud: the unserved request sits on chain, and any player can `cancelSpin` for a full refund after `rescueDelay`.

***

## Keeper

The **tax-keeper** for [$TAKARA](broken://pages/def78502dbee73b11d4333274cd1f4123ea7d73c). Off-chain, not privileged on chain — it calls the permissionless `fundJackpot()` and `deposit()`. Only relevant once $TAKARA is live, which it is not yet.

***

## Owner

The most privileged role, and still cannot reach user funds. **Should be a multisig** — see below.

| Can                                             | Constraint                                                |
| ----------------------------------------------- | --------------------------------------------------------- |
| `setFees`                                       | Within caps; blocked while a spin is in flight            |
| `setTable`                                      | RTP must land in 80–97%; **every rack empty**             |
| `setPacks` / `setPackEnabled`                   | —                                                         |
| `setBuybackSpread` / `setBuybackWindow`         | Within caps                                               |
| `setConsignFee` / `setConsignPayoutFee`         | Within caps; blocked in flight                            |
| `unrack`                                        | Rotate stale inventory back to USDG; zero spins in flight |
| `listToken` (wrapper)                           | Add a prize stock                                         |
| `addStockToTier` / `removeStockFromTier`        | Permit a stock on a tier                                  |
| `setPairFee` (adapter)                          | Pin a swap pool tier                                      |
| `setRestocker`                                  | Rotate the restocker key                                  |
| `setRandomness`                                 | Blocked while a spin is in flight                         |
| `setDex` / `setFeeSplitter`                     | —                                                         |
| `setPaused`                                     | Stops **new spins only**                                  |
| `setRescueDelay`                                | 6 h – 7 days                                              |
| `setDepositLockup` / `setWithdrawDelay` (vault) | ≤ 30 days / 1 h – 7 days                                  |
| `transferOwnership`                             | Two-step; the recipient must accept                       |

### What the owner cannot do

No function exists for any of these.&#x20;

* Withdraw from the Bankroll Vault
* Take player credits
* Touch the jackpot fund or the Golden Chest fund
* Block a card from being unwrapped
* Change the odds a pending spin settles 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 USDG to buy inventory or fund a buyback      |
| `retire`  | Drop a card's cost from inventory when it leaves the machine |

`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.takara.gg/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.
