> 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/using-takara/cards.md).

# Cards

## What a card is

An ERC-721 certificate minted by the `StockWrapper`, holding a specific quantity of one tokenized stock in escrow.

```
Card #412
  underlying   0.0082 NVDA
  face         $6.22        ← USDG the machine actually spent acquiring it
  pack / tier  $10 / common
  won at       block timestamp
```

The **face** is not an estimate. It is the USDG the machine spent on the DEX swap that created the card. There is no oracle and no admin-set price, because the payment *is* the minting. (USDG has 6 decimals; the stock tokens have 18.)

## The escrow floor

The wrapper tracks `totalWrapped` per token which is the sum of every live certificate's holdings. Its actual balance can never be swept below that:

```solidity
surplus = balanceOf(this) - totalWrapped[token];
require(surplus > 0, "Wrapper: no surplus");
```

Only genuinely unattributable tokens — a rebase, or something sent by mistake can be swept by the owner. The shares backing live cards are untouchable.

## What you can do with one

### Hold it

The shares behind it track the real equity. A card minted at $6.22 of NVDA is worth whatever that NVDA is worth later, up or down.

### Unwrap it

```solidity
unwrap(uint256 certId)
```

Burns the certificate and sends you the raw stock token, straight to your wallet. Checks that you own it, and nothing else; **no pause, no allowlist, no operator involvement.** It works from Blockscout with no front-end, and it works if Takara disappears entirely.

One-way. The card is gone.

### Sell it back

For **2 days** after it was won, the house will instant-sell a card for you. `sellBack` burns the certificate, sells the stock on Uniswap V3, and pays you.

```solidity
buybackQuote(uint256 certId) → uint256   // 0 if it cannot be sold back
```

`buybackQuote` returns `0` rather than reverting when the card is ineligible, so the interface can grey the button out instead of failing on submit. The payout you actually receive tracks the stock's real market value at the moment of sale, not a frozen number the house fronts nothing and quotes nothing, it just brokers the sale.

The window is measured from when the card was last won and does not reset on transfer: whoever holds the card within those 2 days can sell it back, and after the window closes nobody can.

### Consign it

Instead of selling, lend the card back to a rack. It sits there earning a cut of every spin, and when someone draws it you are paid its face while the winner takes the card. See [**Consignment**](broken://pages/4f92787eda942e1806545df6fc6721ecf60e982c).

### Drop it to a friend or community

Gift shares by splitting a card and packing them into a **Drop** which is a claimable packet friends open by name or by a share link.

```solidity
split(uint256 id, uint256 amount, address to) → uint256 childId
```

`split` carves part of a card's shares into a new certificate; unwrap that child to raw tokens and fund a Drop with them.

{% hint style="danger" %}
**Splitting is permanent and voids the face-priced perks.** A split card keeps its shares and its unwrap right, but can **never** be sold back or consigned. The contract enforces this — `sellBack` and `consign` both revert with `CardSplit`. A card whose shares left through the side door must not sell back at full face.
{% endhint %}

### Trade it

Cards are ordinary ERC-721s and work on any marketplace. Provenance travels with them: a buyer can read the pack, tier, face and win time straight from `cardMeta`.

A purchased card always keeps its unwrap right, and can still be sold back if it is bought inside the original 2-day window.

## Provenance

```solidity
cardMeta(uint256 certId) → (packId, tierIndex, onRack, face, wonAt)
```

A legendary pull is verifiable by anyone reading the chain, including after the card changes hands.

## Where cards come from

Only one place: `restock`. The restocker spends `count × face` of vault USDG on a DEX swap and the wrapper mints that many equal-slice certificates.

Face equals acquisition cost by construction. That single property is what enforces the published RTP with no oracle anywhere in the system where the machine cannot create a card worth more than it paid for 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.takara.gg/using-takara/cards.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.
