Skip to main content

Backing & Settlement

A backing commits capital to the YES or NO side of a market. At settlement, the oracle's verdict decides the winning side, and the variant decides how the pools are split. This page covers the lifecycle, the exact payout math for both variants, and the dispute and refund paths.

Placing a backing

A backer calls back_market (SOL) or back_market_spl (SPL) with a market, a side, and an amount. The capital is escrowed in that side's vault and a per-backer position account is created:

  • SOL side vaults: yes_vault[market_id] / no_vault[market_id].
  • SPL side vaults: yes_tvault[market_id] / no_tvault[market_id].
  • Position account: binary_back[market_id, backer, side] — one PDA per backer per side.

Because the backer and side are part of the PDA seed, a single wallet can hold positions on both sides of the same market, tracked independently. Backings are accepted while oracle_status = 0 (open), up to the market deadline.

Lifecycle

oracle_statusStateBackingsClaimsNotes
0pending / openAcceptedMarket live until deadline
1resolvedClosedAfter timelockVerdict written; timelock + dispute window running
3disputedClosedHeldDispute opened; awaiting admin (ML-3)
4refund_triggeredClosedReclaim stakeResolution failed / refunded

The timelock between resolved and finalized is 0 seconds on testnet and 48 hours on mainnet. A market is finalized once the timelock elapses with no open dispute (or an admin upholds the outcome after a dispute), at which point payouts become claimable.

CLASSIC payouts

A Classic market is zero-sum. At finalization:

  1. The full losing pool is the prize.
  2. A 2% commission is taken from it to the treasury.
  3. The remaining 98% is distributed to the winning side pro-rata to each winner's stake.
  4. Each winner also reclaims their own principal.
  5. Losers receive nothing — their entire stake funds the winners and the commission.

A winner's total claim is therefore:

classic_payout = own_stake
+ (own_stake / total_winning_stake) * loser_pool * 0.98

where loser_pool is the summed stake of the losing side and total_winning_stake is the summed stake of the winning side.

YIELD payouts

A Yield market is not zero-sum — it is a capital-loss market governed by capital_loss_bps (default 3500 = 35%). At finalization:

PartyOutcome
WinnersRecover full principal (plus yield once wired — see below). They do not capture the loser pool.
LosersKeep 65% of their stake; 35% is forfeited.
Forfeited 35%Split 50/50: 50% → Crucible Pool, 50% → treasury (crucible_share_bps default 5000).

A loser's return and the forfeiture are:

loser_return  = own_stake * (1 - capital_loss_bps / 10000)   // 65% of stake
forfeited = own_stake * (capital_loss_bps / 10000) // 35% of stake
crucible_cut = forfeited * (crucible_share_bps / 10000) // 50% of forfeit
treasury_cut = forfeited - crucible_cut // 50% of forfeit

Winners' principal is returned in full; the loser-pool forfeiture is what funds the Crucible, not a transfer to winners.

Yield accrual status

Not yet live — yield accrual is a scaffold

The "yield" in a YIELD market refers to a planned mechanism where winner principal earns DeFi yield while the market is open. Today this does not run:

  • The deposit_to_yield / withdraw_from_yield CPIs (targeting Save / Solend) are a scaffold and are not wired into finalize.
  • total_yield is 0 at settlement on devnet — winners receive principal only.
  • Mainnet plan: principal is routed into Kamino vault positions, and realized yield is distributed to winners off-chain at settlement.

Do not build payout logic that assumes non-zero total_yield on devnet. See the Mainnet checklist.

Disputes (ML-3)

During the dispute window (the timelock period after oracle_status = 1), a dispute can be raised via resolve_dispute, moving the market to oracle_status = 3 (disputed) and holding all payouts. This is the ML-3 path:

  • Outcome upheld → the market finalizes on the original verdict and payouts proceed.
  • Cannot confirm → the market is converted to refund (oracle_status = 4).

The dispute and admin path is shared with native oracle resolution; see Oracle Resolution → dispute.

Per-market dispute record

A dispute writes a binary_dispute[market_id] PDA. Mainnet additionally introduces a dispute bond to deter frivolous disputes — see the Mainnet checklist.

Refund & timeout

A market resolves to refund (oracle_status = 4) when the outcome cannot be established or upheld:

  • The oracle fails to reach the required consensus / confidence.
  • A dispute review concludes the outcome cannot be confirmed.

On refund, every backer reclaims their original stake via the claim path — no commission, no forfeiture, no payout. The deadline sweeper and settlement workers (see Program & API) drive markets that pass their deadline without a timely verdict toward resolution or refund so capital is never stranded.

Claiming

Once a market is finalized (or refunded), backers call the claim instruction to withdraw:

ResultClaim
Classic winnerOwn principal + pro-rata share of loser pool (after 2% commission)
Classic loserNothing
Yield winnerFull principal (+ off-chain yield on mainnet)
Yield loser65% of stake
Refund (any)Full original stake