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

# Deployments

All on **BNB Smart Chain (chain 56)**. Verify any of these on [BscScan](https://bscscan.com).

### Core

| Contract          | Address                                                                                                                | What it does                                                   |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
| **Machine**       | [`0xD9361C1C160CB056fc4227E1ce18737b3214eEBb`](https://bscscan.com/address/0xD9361C1C160CB056fc4227E1ce18737b3214eEBb) | The game. Racks, spins, settlement, fees, buyback, consignment |
| **BankrollVault** | [`0x73D1269Ff347b16199de3a4Ddf32359718da026C`](https://bscscan.com/address/0x73D1269Ff347b16199de3a4Ddf32359718da026C) | LP deposits, reservations, the house's money                   |
| **StockWrapper**  | [`0xAEFFad09E91CcA022E1dcbb5339b2C62b144DB71`](https://bscscan.com/address/0xAEFFad09E91CcA022E1dcbb5339b2C62b144DB71) | Mints the ERC-721 certificates; holds the shares in escrow     |

### Periphery

| Contract             | Address                                                                                                                | What it does                                                |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- |
| **ZapRouter**        | [`0x5615AF178B6f5Ab82d9F8E8Cd7eFe84e8b109877`](https://bscscan.com/address/0x5615AF178B6f5Ab82d9F8E8Cd7eFe84e8b109877) | Spin with BNB, batch spins, sell back for BNB               |
| **VRFAdapter**       | [`0xCa7E64f1D22792f93ba115dC462765328fe6822D`](https://bscscan.com/address/0xCa7E64f1D22792f93ba115dC462765328fe6822D) | Chainlink VRF v2.5, paid in native BNB                      |
| **PancakeV3Adapter** | [`0x9Ed9B7a3F7f060934d61b59F8E93CaBE82b87fD8`](https://bscscan.com/address/0x9Ed9B7a3F7f060934d61b59F8E93CaBE82b87fD8) | Routes swaps to V3 pools, per-pair fee tiers                |
| **RedPacket**        | [`0xa081574e7bf072213ED9548B986BbD932443B9e2`](https://bscscan.com/address/0xa081574e7bf072213ED9548B986BbD932443B9e2) | Shareable gift packets *(deployed, not yet live in the UI)* |

### Wallets

| Role                    | Address                                                                                                                |
| ----------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| Revenue (protocol fees) | [`0x0A8A76dC46f0B58F1253B25E39dce0e31eF27801`](https://bscscan.com/address/0x0A8A76dC46f0B58F1253B25E39dce0e31eF27801) |
| Token taxes             | [`0xAA6E068c4872CDcDCac423882E4EFDe0b1d49c1E`](https://bscscan.com/address/0xAA6E068c4872CDcDCac423882E4EFDe0b1d49c1E) |

### Prize stocks

Tokenized equities held by the certificates. Every one is permitted on every rarity tier — the tier decides how much you get, not which company.

| Symbol | Company   | Address                                                                                                              |
| ------ | --------- | -------------------------------------------------------------------------------------------------------------------- |
| SPYB   | S\&P 500  | [`0x7138b48df7D98D7e3cc221BfE7192D0a178182D8`](https://bscscan.com/token/0x7138b48df7D98D7e3cc221BfE7192D0a178182D8) |
| TSLAB  | Tesla     | [`0x5b1910eAaD6450E50f816082Aa078C41F10C292f`](https://bscscan.com/token/0x5b1910eAaD6450E50f816082Aa078C41F10C292f) |
| NVDAB  | NVIDIA    | [`0x02Fca66C1D1aFB4E2A7884261eB00F63598a7436`](https://bscscan.com/token/0x02Fca66C1D1aFB4E2A7884261eB00F63598a7436) |
| MSFTB  | Microsoft | [`0x80106cb3EAD06659A5ad19DF39D9b4733863B9b0`](https://bscscan.com/token/0x80106cb3EAD06659A5ad19DF39D9b4733863B9b0) |
| SPCXB  | SpaceX    | [`0xbe9D156892E55e7154BcD3cB0FEA677F9D3103E1`](https://bscscan.com/token/0xbe9D156892E55e7154BcD3cB0FEA677F9D3103E1) |

More will be added as the product grows.

### External dependencies

|                                             | Address                                      |
| ------------------------------------------- | -------------------------------------------- |
| USDT (BSC, 18 decimals)                     | `0x55d398326f99059fF775485246999027B3197955` |
| WBNB                                        | `0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c` |
| Chainlink VRF v2.5 Coordinator              | `0xd691f04bc0C9a24Edb78af9E005Cf85768F694C9` |
| PancakeSwap V3 SmartRouter                  | `0x13f4EA83D0bd40E75C8222255bc855a974568Dd4` |
| PancakeSwap V2 Router *(price oracle only)* | `0x10ED43C718714eb63d5aA57B78B54704E256024E` |

{% hint style="warning" %}
BSC USDT has **18 decimals**, not the 6 you may expect from Ethereum. The whole protocol assumes 18.
{% endhint %}

***

### Reading the state yourself

Everything below is a public view. No API, no trust required.

```solidity
// the prize table
tier(uint256 i) → (cumBps, faceBps, isJackpot)

// what is on a shelf right now
rackSize(uint8 packId, uint8 tierIndex) → uint256
rack(uint8 packId, uint8 tierIndex)     → uint256[]   // the actual cert ids
totalRacked()                            → uint256

// a specific card
cardMeta(uint256 certId) → (packId, tierIndex, onRack, face, wonAt)
buybackQuote(uint256 certId) → uint256    // 0 if it cannot be sold back

// the pots
jackpotFund()  jackpotCertId()  eggFund()  eggVolume()  eggThreshold()

// the bankroll
trackedAssets()  reserved()  available()  totalShares()
previewRedeem(uint256 shares) → uint256

// live fee settings
protocolFeeBps()  jackpotFeeBps()  eggFeeBps()
buybackSpreadBps()  buybackWindow()
consignFeeBps()  consignPayoutFeeBps()
```

On the wrapper:

```solidity
underlying(uint256 id) → (address token, uint256 amount)
ownerOf(uint256 id)    → address
splitOf(uint256 id)    → bool
```

### Events worth indexing

```solidity
SpinRequested(spinId, player, packId, price, requestId)
SpinSettled(spinId, player, tierIndex, certId, payoutUsd, jackpotWon, fallbackPaid)
SpinCancelled(spinId, refund)
Restocked(packId, tierIndex, stock, count, spent, firstId)
SoldBack(certId, seller, price)
Consigned(certId, owner, racked)   ConsignPaid(certId, owner, payout, earned)
JackpotGrown(certId, usdtSpent, stockAdded)
EggCracked(winnerSpinId, winner, amount, windowStart, windowEnd)
Deposited(lp, assets, shares)      WithdrawRequested(id, lp, shares, unlockAt)
```

### Ownership

The contracts use **`Ownable2Step`** — transferring ownership requires the new owner to explicitly accept, so it cannot be sent to an address that cannot use it.

What the owner **can** do: set fees and the prize table (within the hard caps, and only when no spin is in flight), list prize stocks, restock racks, pause new spins.

What the owner **cannot** do, ever: withdraw from the bankroll vault, take player credits, touch the jackpot or egg funds, or block anyone from unwrapping a card. There is no function for any of it.


---

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