Skip to main content

Program reference

Network constants

ItemValue
Slip program8VNZ5VseAcFaYhAZxetgE5N8eiD17ZZNchGhoatYUUXw
TxLINE devnet program6pW64gN1s2uqjHkn1unFeEjAwJkPGHoppGvS715wyP2J
Devnet settlement mintELWTKspHKCnCfCiCiqYw1EDH77k8VCP74dK9qytG2Ujh
Fee treasuryDZqzfMTmFyDvhLWamA4qjiEUUzS8LoTZ6d2KMkXwsiXh
The checked-in unified IDL is newer than the currently published legacy devnet binary. See deployment status.

Accounts

Market

PDA seeds: ["market", creator, id_le_u64] Stores the creator, settlement mint, MarketExpression, two to five labels, two to eight bands, five pool counters, entry and settlement deadlines, fee and tip rates, state, winner, ticket count, claimed winning stake, timestamps, and PDA bump.

MarketTicket

PDA seeds: ["ticket", market, owner, nonce_le_u64] Stores market, owner, nonce, outcome index, stake, claimed flag, and PDA bump. A ticket is immutable after purchase. Reusing a nonce for the same market and owner fails because the PDA already exists.

Vault

The vault is the associated token account for the market PDA and the market’s six-decimal classic SPL mint.

Instructions

InstructionRequired behavior
create_marketValidates expression, labels, bands, mint decimals, fee/tip ceilings, and deadlines; initializes market and vault.
buy_ticketBefore entry close, transfers at least 1 USDT into the vault and creates one ticket.
resolve_marketAfter resolve_at, verifies a terminal TxLINE proof, selects a band, routes fee/tip, and records the winner; insufficient liquidity forces void.
claim_ticketRefunds a voided ticket or pays a winning ticket proportionally; losing and repeat claims fail.
void_marketVoids one-sided markets after entry close or any unresolved market after void_at.

States

StateAllowed transitions
OpenResolved or Voided
ResolvedNo state transition; winning tickets may claim.
VoidedNo state transition; all tickets may refund.

Limits

LimitValue
Minimum stake1_000_000 minor units, 1 USDT
Settlement mint decimals6
Outcomes2–5
Outcome bands2–8
Outcome label48 bytes maximum
Fee ceiling500 bps
Resolver tip ceiling200 bps

Settlement arithmetic

total = sum(pools)
fee   = floor(total * fee_bps / 10_000)
tip   = floor(total * tip_bps / 10_000)
net   = total - fee - tip
payout = floor(ticket.stake * net / winning_pool)
Multiplication uses u128. The final winning claim transfers remaining rounding dust to the fee treasury. A void refund is exactly the ticket stake and has no fee or tip.

Errors

ErrorMeaning
BadStateAccount state or vault balance does not permit the instruction.
ClaimNotOpenProof timestamp or clock is before resolution eligibility.
VoidNotReachedNeither the one-sided entry-close rule nor timeout applies.
BpsTooHighFee or resolver tip exceeds its ceiling.
WrongRootsAccountTxLINE roots owner, PDA, layout, or slot is invalid.
ProofInvalidMerkle folding does not reproduce the anchored root.
FixtureMismatchProof fixture differs from the market fixture.
EpochDayMismatchProof day and roots account day differ.
MissingSecondStatExpression and proof disagree on second-stat shape.
StatKeyMismatchProved stat key differs from the expression.
EntryClosedPurchase occurred at or after the entry deadline.
InvalidTermsStat key, side, period, or operation is non-canonical.
FixtureNotFinalProof is not from phase 5, 10, 13, or 100.
StakeBelowMinimumTicket stake is below 1 USDT.
WrongMintDecimalsSettlement mint does not use six decimals.
LosingTicketResolved ticket does not hold the winning outcome.
TicketAlreadyClaimedTicket has already paid or refunded.
InvalidOutcomesLabels or bands do not form a valid complete market.
InvalidOutcomeIndexOutcome index is outside the market’s labels.
Overflow / BadNumericInteger calculation or conversion is outside the supported range.