TAPER

Program reference

Anchor program today. Amounts: xStock in raw units (8 decimals), USDC in 1e-6 units, prices in 1e-8 USD per share, ratios in fixed point with 1e12 = 1.0.

Instructions

InstructionArgumentsAccountsWho calls it
init_confignoneauthority, config, program, program_data, today_mint, pool, burn_authority, burn_today, today_token_program, associated_token_program, system_programThe upgrade authority, once at launch
create_marketnonepayer, stock_mint, market, stock_vault, usdc_vault, burn_authority, burn_usdc, usdc_mint, token_program, token_2022_program, associated_token_program, system_programAnyone, for a listed mint
depositamount: u64owner, market, position, stock_mint, owner_stock, stock_vault, token_2022_program, system_programA holder, while no day is live
withdrawshares: u64owner, market, position, stock_mint, owner_stock, stock_vault, token_2022_programA holder, while no day is live
claim_premiumnoneowner, market, position, owner_usdc, usdc_vault, usdc_mint, token_programA holder
open_dayny_day: i64opener, market, day, price_update, system_programAnyone, during the session
buy_callstrike_index: u8, quantity: u64, max_cost: u64buyer, market, day, ticket, stock_mint, price_update, buyer_usdc, usdc_vault, usdc_mint, token_program, system_programA trader, until ten minutes before the close
settle_daynonemarket, day, price_update, usdc_vault, burn_usdc, burn_authority, usdc_mint, token_programAnyone, with the closing update
void_daynonemarket, dayAnyone, an hour after an unsettled close
claim_callnonemarket, day, ticket, owner, stock_mint, owner_stock, stock_vault, owner_usdc, usdc_vault, usdc_mint, token_program, token_2022_programThe ticket's owner, after settlement or void
close_daynonemarket, day, openerAnyone, once every ticket is claimed
burnamount: u64config, burn_authority, burn_usdc, burn_today, today_mint, usdc_mint, pool, amm_config, pool_authority, usdc_pool_vault, today_pool_vault, observation, token_program, today_token_program, raydium_programAnyone

Events

EventFields
DayListedmarket, day, close_ts, listed_price, vol, strikes, cover
CallBoughtmarket, day, buyer, strike, quantity, spot, multiplier, premium, fee
DaySettledmarket, day, price, publish_time, payout, premium, fee, variance
DayVoidedmarket, day
Burnedusdc_in, today_burned, twap_out

Constants

NameValueMeaning
STRIKES5Strikes per day
SALES_CUTOFF_SECS600Sales stop this long before the close
SETTLE_TWAP_SECS900The 4 pm price is the pool's mean price over this many seconds before the close
PRICING_TWAP_SECS600Listing and buying use the higher of the pool's price now and its mean over this window
VOID_AFTER_SECS3,600One hour: the pool forgets the settlement window about 25 minutes after the close
VOL_MARKUP1.10Volatility charged over the estimate
MIX_WILD_WEIGHT, MIX_WILD_SCALE0.10, 2.5The fat-tail mixture
VAR_DECAY0.94Daily variance EWMA decay
VAR_LEARN_MIN_REMAINING0.5A day must be listed with half its variance ahead to teach the estimate
VAR_SAMPLE_CAP0.04Cap on one day's squared move
FEE_BPS1,000Fee on top of the premium, all burned
BURN_MAX_USDC1,000 USDCMost one crank call spends
BURN_MAX_POOL_BPS10Most one crank call spends, as a share of the pool's USDC (0.1%)
BURN_MIN_OUT_BPS9,800Minimum swap output against the TWAP (98%)
BURN_TWAP_SECS1,800TWAP window