> 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/using-the-protocol/bankroll-vault.md).

# Bankroll Vault

Deposit USDT and you are the house. Your shares grow when players lose and shrink when they win.

### What you are actually buying

The vault takes the other side of every spin. It receives **96% of every pack price** and pays out **every card the machine hands over**. In expectation that is positive, the edge is 6.5% of volume but it is a position in a game, not a yield product.

```solidity
deposit(uint256 amount) → uint256 shares
```

Shares are priced at NAV on the way in and on the way out.

### The reservation system

This is the mechanic that makes the whole machine solvent, and it is why the vault always looks like it has idle cash.

Before a spin is accepted, the machine reserves that pack's **worst-case payout**:

```
reserved = pack price × maxFaceBps      // 8.88 × 8.88 = $78.85
```

If `available()` cannot cover it, the spin **reverts before it starts**. The reservation is released at settlement.

```solidity
available() = trackedAssets - reserved
```

Two consequences worth understanding:

**Idle cash is not idle.** It is the solvency guarantee. If every dollar were spent on inventory, `available()` would be zero and nobody could spin at all.

**Concurrency is capped by cash, not by inventory.** A vault with $111 free supports one concurrent 8.88 spin. The second reverts until the first settles. More concurrency means more cash, not more cards.

### What the vault holds

Not only USDT. When the restocker buys cards, `draw()` moves USDT out of `trackedAssets` and the value sits on the racks as tokenized stock until it is won or rotated back.

So NAV moves with **two** things: game results, and the price of the equities sitting on the shelves.

***

### Getting out

Two timers, for two different reasons.

|                      |                                      |
| -------------------- | ------------------------------------ |
| **Deposit lockup**   | **48 hours** from your last deposit  |
| **Withdrawal delay** | **24 hours** after `requestWithdraw` |

**The lockup** stops someone depositing just before a large win and withdrawing immediately after. The edge is a long-run average; letting capital arrive and leave around single outcomes lets it be gamed.

**The delay** gives the operator time to convert racked inventory back into USDT. Most of the vault can legitimately be stock on the shelves, and a pending withdrawal is the signal to unrack.

```solidity
requestWithdraw(uint256 shares) → uint256 requestId
cancelWithdraw(uint256 requestId)
executeWithdraw(uint256 requestId)
```

{% hint style="warning" %}
**Every deposit resets the 48-hour lockup**  `depositedAt` is stamped on each one, so topping up restarts the clock on your entire position.
{% endhint %}

Withdrawals are priced at NAV **when executed**, not when requested. You carry the game's variance for the whole 24 hours.

***

### The risks, plainly

**Variance.** A run of legendary pulls on a small bankroll is a real drawdown. The 8.88× tier fires 0.6% of the time; over a few hundred spins that is not rare.

**Equity exposure.** Racked inventory is real stock. If SPY drops 5% overnight, NAV drops with it, independent of anything players did.

**Not liquid.** 48 hours locked, then 24 more to exit, at a price you do not know when you request it.

**No fees to cushion it.** There is no deposit fee, withdrawal fee, management fee or performance fee -which is good, but it also means the 6.5% edge is the entire compensation for the risk.

### What protects you

**The owner cannot withdraw from the vault.** There is no function. `draw()` is `onlyMachine` and only ever buys inventory or pays a buyback.

**Reserved assets are untouchable.** `draw` can only take from `available()`, which excludes everything spoken for by in-flight spins.

**The RTP band is enforced in bytecode.** The operator cannot raise the payout table above 97% to court players at your expense  `setTable` recomputes and reverts.

**You can always exit.** `executeWithdraw` needs no operator action. If the front-end vanishes, call it from BscScan.

***

### Reading the vault

```solidity
trackedAssets()   // USDT the vault accounts for
reserved()        // locked behind in-flight spins
available()       // trackedAssets - reserved
totalShares()
sharesOf(address)
previewRedeem(uint256 shares) → uint256   // informational; execution re-prices
depositedAt(address)                      // your lockup clock
```


---

# 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/using-the-protocol/bankroll-vault.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.
