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

# Consignment

Lend a card back to the machine. It sits on its rack earning a cut of **every spin**, and if someone draws it you are paid its face value.

### How it pays

Two streams, and the first is the interesting one.

#### While it sits there

Your card earns **2% of every spin**, pro-rated by the consigned share of that rack:

```
your cut per spin = pack price × 2% × (consigned cards ÷ total racked)
```

On an 8.88 pack with 1 consigned card out of 8 racked:

```
8.88 × 0.02 × (1 ÷ 8) = $0.0222 per spin
```

This accrues **whether or not your card is the one drawn**. It is paid from the house's share before the vault sees it, using an accumulator, so settlement stays O(1) no matter how many cards are lent.

#### When it gets drawn

The player takes the card. You are paid:

```
face value × (1 − 2.25%)   +   everything it earned while racked
```

Credited immediately, claimable any time.

#### When you take it back

```solidity
unconsign(uint256 certId)
```

Returns the card and pays out accrued fees directly. Blocked while any spin is in flight — shrinking a rack mid-flight would shift the draw for a spin already paid for.

***

### Rules

**Only machine-won cards.** `consign` opens with:

```solidity
if (m.face == 0) revert NotMachineCard();
```

A certificate you created by wrapping your own tokens has no face and cannot be consigned. Wrapping is not a path into consignment.

**No split cards.** Splitting voids the face permanently, and the face is what the payout is calculated from.

**Face must still match its tier.** If the prize table was re-rated while the card was out of circulation, `consign` reverts with `BadFace` rather than putting a mispriced card on a shelf.

**Mid-flight consigns queue.** If a spin is pending, your card is accepted but **not racked,** it goes into a queue and lands on the shelf when the queue is flushed:

```solidity
bool racked = spinsInFlight == 0;
if (racked) _rackCard(certId, m); else _pendingConsign.push(certId);
```

`flushConsignments(max)` is permissionless — anyone can clear the queue, and it only ever helps.

***


---

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