> For the complete documentation index, see [llms.txt](https://docs-v4.nftx.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-v4.nftx.io/gacha/for-spinners.md).

# For Spinners

Spin a gacha machine: pay one emergent price per pull, get a verifiably random NFT drawn with Chainlink VRF, and claim your prize.

Spinning is the fun half. You pay a price, verifiable randomness picks a winner, and you claim your NFT. Because the price is always the machine's expected value plus the vig, every pull is priced at **floor value or better** — you're never paying more than what the machine is expected to pay out, plus the house edge.

{% hint style="warning" %}
**Testnet only.** Gacha is live today only on **Ethereum Sepolia** (chain `11155111`) as a rehearsal — there is no mainnet deployment yet.
{% endhint %}

## Spin, resolve, claim

A spin is a two-step flow, because the randomness comes from an oracle that answers a few blocks later:

```
quote(machineId, pulls)   →  see the price per pull and the snapshot hash
        │
spin(machineId, pulls, maxPricePaid)   →  pay; your request is PENDING
        │                                  (Chainlink VRF is requested)
        ▼
   RESOLVED   ←── the random word lands, a few blocks later
        │
claim(requestId, snapshot, count)   →  your NFTs transfer, change (if any) refunds
```

You spin on the [NFTXGacha](/contracts/gacha.md) contract. In practice you rarely have to claim yourself: anyone can `claimFor` a resolved spin in exchange for a small tip, and a house bot does exactly that within minutes of the reveal — so your prize lands without you sending a second transaction. You can always claim it yourself if you'd rather.

### What you pay

* **One price per pull, set by the machine.** Call `quote` first — it returns the current per-pull price and the snapshot hash your claim will need. The price is live and moves with inventory, so `spin` takes a `maxPricePaid` **slippage cap**: if the quote drifts above it before you land, the spin reverts instead of overpaying.
* **A small RNG surcharge.** On top of the price, you cover the cost of your own Chainlink VRF request. This tops up the machine's VRF subscription; it isn't house revenue.
* **Batches, up to 20 pulls.** Each pull in a batch draws independently from the single random word. On mainnet, gas makes a lone cheap spin uneconomic, so machines enforce a minimum spin price and batching is the norm — claims are resumable, so a large batch survives a gas spike mid-claim.

## The odds are honest

The draw weights are the pricing weights — there's no hidden table:

* **Cheaper collections drop more often.** An asset's chance is inverse to its price, so the floor collections are the common pulls and the dear ones are rare. That's the same math that sets the price ([How it works](/gacha/how-it-works.md#pricing-expected-value-plus-the-vig)).
* **Jackpots are real but rare.** A 100-ETH jackpot in a machine of 1-ETH floors might drop around 0.1% of the time — and the machine tells you so. It's cheap to *advertise* a jackpot precisely because hitting it is unlikely; the odds aren't massaged.
* **Within a collection, every unit is the same prize.** The specific token ID you receive is uniformly random, but since every unit is a floor NFT, they're worth the same.

## Fair randomness, and the no-refund rule

The draw uses **Chainlink VRF v2.5** — cryptographically verifiable randomness, not a block hash or a house RNG. Because the price is committed in one block and the random word arrives in a later one, no flash loan or same-transaction trick can bend an outcome that was already sealed.

{% hint style="warning" %}
**A slow or stuck spin is never refunded on demand.** If it were, you could watch the pending fulfillment, compute your result, and cancel your losses while keeping your wins — which would flip the house edge in the players' favour. So instead:

* If a fulfillment is slow, the request can be **re-requested** for a fresh random word against the same price and the same snapshot. It's expected-value-neutral — a new roll of the same dice, not a free do-over.
* Only after a long **escape window** (7 days) with no fulfillment at all can the full price be refunded. By then there was never an outcome to game.
* If the machine is fully drained by the time you claim, the pulls that had nothing to draw against are refunded from your escrow — you only pay for prizes you could actually receive.
  {% endhint %}

## After you win

The NFT is yours. Keep it, or sell it straight back to floor through the [Zap](/contracts/zap.md) (`sellNFTForETH`) — that routes the NFT into the Locker at floor value, minus the pool fee and slippage. There's no obligation to sell, and nothing routes a prize back into the gacha automatically; a machine only refills when depositors add fresh inventory.
