Solana Predictions
How it actually works

Solvency and queue

How the protocol stays open for new coupons even when the LP is temporarily insolvent.

The protocol's LP can be temporarily insolvent. A FIFO payout queue and a parked-funds side bucket guarantee winners eventually get paid, in order, while keeping the protocol from blocking new coupons.

The model

Conceptually, the protocol has three separate accounting buckets:

  • treasury, the LP balance. Cannot go negative.
  • sideBucket, pending-harvest funds parked here while the queue is non-empty.
  • Payout queue, a FIFO of unpaid winning coupons. Each entry: (user, amount).

This is the Martingaler mechanism (whitepaper): instead of holding pre-funded LP that pays winners on demand, the protocol queues winners when reserves are short, and clears them as future losses replenish the LP.

What enters the queue and what doesn't

The queue holds only the profit portion of a winning coupon that exceeded the LP's available budget at settle time.

Close resolution flow: losing vs winning paths routing through treasury, sideBucket, and the payout queue

Loss/liq proceeds route to treasury (queue empty) or sideBucket (queue active). Wins pay direct from treasury when solvent, else queue. Harvest drains sideBucket into queued payouts.

Winning coupons

When a coupon settles at a profit:

  • If the queue is empty and treasury ≥ payout: pay the user immediately, debit treasury.
  • Otherwise: append (user, payout) to the back of the queue. treasury is unchanged.

Losing Coupons

When a coupon settles at a loss

  • If the queue is empty: the LP-retained slice (loss minus 2% fee) credits treasury directly.
  • If the queue is non-empty: the LP-retained slice is parked in sideBucket instead of treasury. The $BET mint still fires on losses regardless; close-loss mints are gated by the queue (the Exchange skips the tokenomics call when proceeds went to sideBucket).

Harvest

A keeper periodically calls:

  • Walk the queue head forward, paying out each entry (user, amount) from sideBucket if the funds are there.
  • If sideBucket runs out before the queue is clear, stop. Future losses will refill it.
  • If the queue empties with sideBucket > 0, the residual returns to treasury as normal LP gain.

Harvest is permissionless; anyone can run it. The keeper does it on a schedule so users don't have to.

On this page