StockPacks

Settlement

A pack resolves in stages across separate transactions, and the last stage is yours: you see what you drew, then choose how to be paid inside a 15-minute window.

The stages

  1. Purchase. Your payment is taken, a future drand round is pinned, and the pool freezes. The outcome does not exist yet.
  2. Resolution. When that round publishes, the beacon word is recorded onchain and your acquisition is marked ready. The outcome now exists and has not been applied.
  3. Allocation. A separate call runs the selection. The drawn card leaves the pool, fees are distributed, and your settlement window opens. The pool keeps turning underneath — nothing waits on you.
  4. Your choice. Keep the stock, or exercise the depositor's standing bid — in ETH or in $SP.

Resolution and allocation are separate because the randomness callback runs under a gas limit the coordinator enforces. Doing selection and fee distribution inline would make settlement fail exactly when the pool is large, which is the worst possible time.

The three choices

Keep the stockresolve(id, Stock)

one whole unit, transferred to your wallet

Take the bid in ETHresolve(id, BidEth)

90% of the listing's backing, credited to claim

Take the bid as $SPresolve(id, BidToken)

the same ETH buys $SP off the pool, for you

The bid is the depositor's standing offer: 90% of the backing they escrowed, frozen when your pack was bought. It pays the same however the stock has moved — that is what a standing offer means. Selling back returns the stock to its depositor along with the rest of their escrow.

Choosing $SP settles the same amount, but the ETH buys $SP from the protocol's own pool and delivers it to you — a market buy, never a treasury transfer. The swap runs as its own transaction (claimAsToken) so a thin pool can never wedge settlement; if the pool cannot fill, the ETH waits and claimSettlementAsEth takes it as ETH instead.

The window

For 15 minutes from allocation the choice is yours alone. After that the drawn depositor may close it, and after 2 hours anyone may — both land the default: you keep the stock, the depositor keeps their backing.

Treat the 15 minutes as hard. The moment the window ends, a depositor whose bid is worth more than the stock will close it to the keep-default — that is their right and their rational move. An election worth taking is an election worth taking inside the window.

The window terms are frozen onto your acquisition when you buy, alongside the surcharge and the bid rate — no parameter change mid-flight can shorten a window you already paid for.

The reveal on this site

The gap between resolution and allocation is a real window in which the result is public and unapplied. The pack animation is synced to it: we read the same word the contract will read and run the same selection it will run, so the card that turns over is the card allocation is about to deliver. It is labelled predicted until the allocation lands, then settled. Nothing is faked, and nothing is decided by the front end.

Who settles

processAcquisitions and finalize are permissionless. We run a keeper that calls them, but the keeper holds no privilege — if it goes down, settlement is delayed, never at risk. Anyone can call them, including you.

What each party gets

  • Purchaser — the stock, or the bid in ETH or $SP. Your choice.
  • Drawn depositor — on a keep: their whole backing, less the 1% settlement cut, plus all fees accrued to the listing. On a sell-back: their stock returned, the unbid 10% of their backing, and their accrued fees. Their card leaves the pool either way.
  • Every other depositor — a share of this pack's fees.

Payouts are credited, not pushed. You claim them with claim. One address with a reverting fallback must not be able to block settlement for the purchaser or for anyone behind them in the queue.

When a draw refunds instead

If the pool has become worth more than you paid between purchase and allocation, the protocol refunds you instead of drawing. The surcharge is the tolerance, so this needs no extra parameter: a draw proceeds exactly while you still paid at least what it is now worth. If the pool empties entirely in that window, it refunds too. Settlement never reverts; it degrades to a refund, because a reverting entry could wedge the queue permanently with no way out.