Constants§
- ADMIN_
ADDRESS - The authority allowed to invoke
Initialize. Replace with your deploy multisig / key before mainnet. - BTC_
VOID_ THRESHOLD_ BPS - Void threshold in basis points of absolute price move (1 bp = 0.01%).
- CP_
AMM_ PROGRAM_ ID - Meteora DAMM cp_amm program ID (CPI
claim_position_fee; local treedamm-v2/programs/cp-amm). - EXECUTOR_
ADDRESS - Must sign executor-gated instructions:
InitMarket,AdminInstantSettlement,ExecutorTreasury,ClaimPositionFee. Replace before production. - EXECUTOR_
PAY_ DAILY_ JACKPOT ExecutorTreasury(JACKPOT_PAYpool): debitcrate::state::Treasury::daily_jackpot.- EXECUTOR_
PAY_ WEEKLY_ JACKPOT ExecutorTreasury(JACKPOT_PAYpool): debitcrate::state::Treasury::weekly_jackpot.- FEE_
COLLECTOR - SPL USDC recipient for team-fee legs:
ticket_team_bps(BuyTickets),hook_team_bps(ClaimPositionFee). - HOOK_
BUYBACK_ BPS - Hook fee to buyback (
MAX_BPSscale). - HOOK_
RESERVE_ BPS - Hook fee accrued to treasury reserve (
MAX_BPSscale). - HOOK_
TEAM_ BPS - Hook fee to team (
MAX_BPSscale). - HOOK_
WEEKLY_ BPS - Hook fee routed to weekly pool (
MAX_BPSscale). - LEDGER
- The seed of the ledger account PDA.
- MARKET
- PDA seed for
crate::state::Market. - MARKET_
OPEN_ ANCHOR_ GRACE_ SECS InitMarket(open-anchor crank / tail ofcreate):Clock::unix_timestampmust satisfy∈ [open_ts, min(open_ts + this constant, close_ts))so the open tick aligns with bucket start (fixed-bucket oracle anchor).- MAX_BPS
- Basis points denominator (100%).
- MAX_
MARKET_ SERIES - Maximum supported concurrent market series (
series_id∈0..MAX_MARKET_SERIES).Treasury::next_periodis a monotonic floor cursor (max(period+1)bookkeeping);InitMarketandPlaceBetdo not require matching it. - POSITION
- PDA seed for
crate::state::Position. - PRIZE_
DAILY_ BPS - Prize-side routing to daily (
MAX_BPSscale). - PRIZE_
RESERVE_ BPS - Prize-side reserve routed into treasury weekly (
MAX_BPSscale). - PRIZE_
WEEKLY_ BPS - Prize-side weekly share (
MAX_BPSscale). - PYTH_
BTC_ USD_ FEED_ ID - BTC/USD canonical Pyth price feed ID (Hermes / Pythnet).
- PYTH_
BTC_ USD_ PRICE_ FEED_ ACCOUNT - BTC/USD push feed account — shard 0, maintained by the Pyth Data Association.
- PYTH_
MAX_ PRICE_ AGE_ SECS - Maximum age in seconds (vs
Clock::unix_timestamp) that a Pyth HermesPriceUpdateV2publish_time may lag behind the on-chain clock before it is rejected as stale. - PYTH_
PUSH_ ORACLE_ PROGRAM - Pyth Push Oracle program — continuously updates price feed accounts on-chain.
- PYTH_
RECEIVER_ PROGRAM - Pyth Receiver program (Hermes pull feeds) — same address on mainnet-beta and devnet.
- TICKET_
BUYBACK_ BPS - Ticket revenue split to buyback reserve (
MAX_BPSscale). - TICKET_
DAILY_ BPS - Ticket revenue split to daily pool (
MAX_BPSscale). - TICKET_
MICROS - Smallest SPL USDC increment: 10^-6 USD per base unit; ticket purchases and market stakes use whole multiples (1 whole USDC =
TICKET_MICROSunits). - TICKET_
TEAM_ BPS - Ticket revenue split to team (
MAX_BPSscale). - TICKET_
WEEKLY_ BPS - Ticket revenue split to weekly pool (
MAX_BPSscale). - TREASURY
- The seed of the program treasury PDA (owns the protocol USDC ATA).
- USDC_
MAINNET_ MINT - SPL USDC mint on Solana mainnet-beta (Circle). Token accounts in ix must use this mint (
Initializeis implicit via consts). EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v - mainnet