Skip to main content

Module instruction

Module instruction 

Source
Expand description

Instruction discriminators + payload types.

The on-chain program is a thin USDC custody + price-chain layer. All game logic (bets, balances, pools, leaderboards) is off-chain.

Structs§

AdminInstantSettlement
Advance the price chain: read Treasury::last_close_* as the open reference, read the Pyth push feed as the close price, resolve UP/DOWN, emit PeriodSettled, and write the close price back to Treasury::last_close_*.
AdminPayout
Pay amount µUSDC from the treasury ATA to recipient_ata. Used for winner payouts, jackpot distributions, and withdrawals. Only EXECUTOR_ADDRESS may sign.
Deposit
User deposits USDC into the treasury. Emits Deposited { user, amount } so the server can credit the user’s off-chain balance.
Initialize
One-time setup: creates Treasury PDA + treasury USDC ATA and seeds the genesis BTC close price from the Pyth push feed. payer must be ADMIN_ADDRESS.

Enums§

StreakInstruction