mathematically perfect

certified optimal execution

accounts

The program owns three accounts per coin, all program derived. Their addresses are computed from the mint and the program id and shown live below. Anyone can read them.

accountseedsaddresssize
config["config", mint]144 bytes
vault["vault", mint]0 bytes of data, holds sol and owns the token account
record["record", mint]8 + 16 + 64 · 160 bytes

config layout

The config account is written once at initialisation and then only by claim and execute. Offsets are in bytes.

discriminator0mint8curve40bump_config72bump_vault73padding74reserve_floor_num80impact_bound96accepted_count112rejected_count128
offsetsizefieldtype
08discriminatorfixed bytes
832mintpubkey
4032curvepubkey of the pump.fun or amm pool account
721bump_configu8
731bump_vaultu8
746paddingzero
8016reserve_floor_numQ64.64, constant 3/4
9616impact_boundQ64.64, constant 1/20
11216accepted_countu128
12816rejected_countu128
fieldlive value
discriminator
mint
curve
bump_config
bump_vault
reserve_floor_num
impact_bound
accepted_count
rejected_count

record layout

The record is a ring of sixty four entries. Each entry is one submission. The head index points at the next slot to be written, so the newest entry is at head minus one.

offsetsizefield
08discriminator
88head, u64
168padding
2464 × 160entries
offset in entrysizefield
032submitter pubkey
328slot, u64
401outcome, 1 accepted, 0 rejected
417padding
4816x_star, signed Q64.64 with sign in the top bit
6416lambda_1
8016lambda_2
9616lambda_3
11216r_stat
12816r_prim_plus_dual, the sum of r_prim and r_dual
14416r_slack
submitter0slot32outcome40padding41x_star48lambda_164lambda_280lambda_396r_stat112r_prim_plus_dual128r_slack144

instructions

instructionsigneraccountseffect
initializedeployerconfig, vault, record, mint, curve, systemCreates the three accounts, stores the constants, sets both counts to zero. Callable once.
claimanyoneconfig, vault, creator fee vault, pump programMoves accrued creator fees into the vault. Increases R.
submitanyoneconfig, vault, record, curve, pump or amm program, token accountsVerifies the certificate, executes exactly x* on residual zero, writes one entry, increments one count.

There is no withdraw, no pause, no admin, no upgrade authority after deployment. The instruction set is the whole of what the program can do.

live state

quantityvaluesource
Rvault lamports
Ivault token account
scurve account
tcurve account
kcomputed
p₀computed, 12 decimals
headrecord
acceptedconfig
rejectedconfig
latest outcomerecord head − 1
latest x*record
latest λrecord
latest residualrecord

invariants, checked live

invariantcheckstatus
reserve floorR ≥ R_before_last_execute / 4
inventory signI ≥ 0
countsaccepted + rejected = entries written, capped at 64 for the visible ring