The pool
The pool is one USDC vault owned by the program. Its accounting lives in Config.pool and always satisfies
vault balance = cash + locked_margin + keeper_escrow + protocol_fees + buyback_fees + staker_rewards
cash is the only part that pays winners. equity() is cash minus the queued liability, never below zero.
Open interest
Each market side may carry at most max(oi_floor, pool equity x oi_equity_multiple_bps / 10,000) of notional, checked at every open. A small pool therefore takes small positions, and the limit grows with the pool. One position is also capped at max_position_notional.
The venue token
The venue token has a fixed supply cap (venue_supply_cap) and its mint authority is a program address. It is minted only by claim_emission, never by an admin.
Tokens are minted per emission epoch of epoch_secs. At the end of an epoch, close_epoch marks the pool's value to market across every market, compares it with its high-water mark, and turns any rise into tokens.
| Pool value | Tokens per $1 of new gain |
|---|---|
Below emission_knee (reference $2M) | emission_per_usd (reference 100) |
| Above the knee | emission_per_usd x (S / (S + H))^2, with S = emission_decay_scale and H the high-water mark |
The epoch's tokens are shared by the losses settled in it, each weighted by its loss basis times its leverage over 1000. A hedged pair (a long and a short of the same size) moves almost nothing into the pool, so the epoch has almost nothing to mint, whichever wallets or markets its legs use. The last 64 epochs stay claimable.
The cap and the owners
While the payout queue is empty, sweep_surplus moves pool cash above pool_soft_cap (reference $5M) to stakers. Stakers also receive staker_fee_share_bps of every collected fee. Rewards accrue only while at least 1,000 tokens are staked in total. Unstaking waits unstake_cooldown_secs.
Fees
| Fee | Charged on | Goes to |
|---|---|---|
Win fee, win_fee_bps (reference 2%) | Profit of winning closes | Split between stakers, buyback and treasury |
Loss fee, loss_fee_bps (reference 2%) | Lost margin, carved from the pool's gain, waived while the queue is not empty | Same split |
Keeper fee, keeper_fee | Escrowed at request, two fills | The caller of each fill |
Liquidation reward, liquidation_reward_bps | Forfeited margin | The liquidator |
burn_fee_share_bps of fees goes to a buyback bucket that buyback_burn spends on the venue token through the configured pool and burns, at most buyback_max_per_call per call and once per buyback_interval_secs.