Docs
ROOKIE is one Solana program. Everything below can be read from its accounts and done from your own code. The IDL, the TypeScript client and the test vectors are published with the program.
Where ROOKIE goes
ROOKIE prices whether a new coin graduates from its launchpad's curve. It starts with Pump.fun; the rest is the direction, not something that runs today.
- now: Pump.fun coins. Every call today is on a new Pump.fun coin. The program reads the coin's Pump.fun bonding-curve account to price it and to settle it.
- next: Every top Solana launchpad. Each launchpad that states graduation in an account the program can read gets its own reader, graduation test and cap. One is added when its layout has been read on mainnet.
- then: Launchpads on other chains, over bridges. A graduation on another chain is brought to the Solana program through a cross-chain bridge and checked in the program, never taken on a server's word. Bets and payouts stay in SOL, in the same bankroll.
Accounts
| Account | Holds |
|---|---|
| Config | Every parameter the program runs with: cut, windows, caps, daily stop, burn share. |
| Brain | The model's numbers: one weight per input, the step size, the lesson count and the running squared error. |
| Bankroll | ROOKIE's balance, what is reserved for payouts, the day-start balance, net winnings, the previous high and what was released for burn. SOL sits in its vault. |
| Call | One market on one coin: the coin's mint and curve, open and close snapshots, stakes and reserved payouts per side, deadline, result. |
| Bet | One wallet's position on one call; it holds both sides, each with its stake and fixed multiple. |
| Holder | One wallet's $ROOKIE record: registrations used today and the total it burned. |
Instructions
| Action | Who | Instruction | The program refuses when |
|---|---|---|---|
| Bet | anyone | place_bet(side, stake, min_multiple_ppm) | betting off; bet window closed; stake above the largest allowed now; daily stop; bankroll empty; multiple below the minimum you set |
| Settle | anyone | settle_call | before the deadline; already settled |
| Confirm graduation | anyone | confirm_graduation | curve not complete; after the deadline |
| Record close snapshot | anyone | record_close | bet window not over; already recorded |
| Claim | anyone, pays the bettor | claim | not settled; lost; already claimed |
| Register a coin | $ROOKIE holder | open_call(question_id = 0, kind = 1), after init_holder once per wallet | mint checks; below the lowest tier; registrations used today; token not set |
| Burn to raise limit | holder | burn_for_limit(amount), after init_holder once | token not set; balance short |
| Add to bankroll | anyone | fund_bankroll(amount) | amount 0 |
| Close accounts | anyone | close_bet / close_call | - |
Each action is one transaction. Settle, confirm graduation, record close and claim can be sent by anyone.
Payout
p_graduates = p, p_stays = 1 - pmultiple(side) = 1 + (1 - cut) x (1 - p_side) / p_side- cut = 8% of winnings, so a winning bet always returns more than its stake.
- The multiple is fixed when the bet is placed. Payout = stake x multiple.
- a bet is refused if the call's total net payout on graduates would exceed L / 2; L is the least loss of forcing the coin to graduate, computed live from the curve.
From your own code
Read a probability
- Fetch the Brain account and the coin's bonding-curve account (PDA of seed "bonding-curve" and the mint, under the Pump.fun program).
- Decode both with the IDL, or read the curve bytes with the layout below.
- Run the integer model from the client package on the curve fields and the brain weights.
- The result is the probability of graduates in ppm (1,000,000 = 100%). It equals what the program computes at the same slot. A bet prices graduates at no less than 1% and stays at no less than 5%; there is no ceiling.
Bet
- Read the Call, Config and Bankroll accounts and compute the multiple and the largest stake allowed now.
- Build place_bet with the side, the stake in lamports and the lowest multiple you accept.
- Sign and send. The stake moves into the bankroll vault and the multiple is fixed in your Bet account.
Settle
- After the call's deadline, build settle_call with the Call, Brain, Bankroll and curve accounts.
- The program records stays and runs one lesson on the brain in the same transaction.
- Before the deadline, when the curve shows complete, confirm_graduation settles the call as graduated at once. A graduation not confirmed by the deadline counts as stays.
Claim
- After settlement, build claim with the Call, the Bet and the bettor's wallet.
- Anyone may send it; the payout always goes to the bettor.
Bonding-curve layout
Byte offsets after the 8-byte discriminator. The account is 206 bytes; accounts created before 2026-11-27 are 166 bytes and stop before created_at_slot.
| Field | Bytes |
|---|---|
virtual_token_reserves (u64) | 8 to 16 (8 bytes) |
virtual_sol_reserves (u64) | 16 to 24 (8 bytes) |
real_token_reserves (u64) | 24 to 32 (8 bytes) |
real_sol_reserves (u64) | 32 to 40 (8 bytes) |
token_total_supply (u64) | 40 to 48 (8 bytes) |
complete (bool) | 48 (1 byte) |
creator (pubkey) | 49 to 81 (32 bytes) |
is_mayhem_mode (bool) | 81 (1 byte) |
is_cashback_coin (bool) | 82 (1 byte) |
quote_mint (pubkey) | 83 to 115 (32 bytes) |
creator_fee_bps (u64) | 115 to 123 (8 bytes) |
is_holder_reward (bool) | 124 (1 byte) |
created_at_slot (u64) | 166 to 174 (8 bytes) |
tax_exempt_creator (pubkey) | 174 to 206 (32 bytes) |
Pump.fun program: 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P