the kimchi experiment

Program

PROGRAM
MINT
RESERVE

Wallet record

bytes 0 to 7discriminator[u8; 8]bytes 8 to 39wallet pubkeypubkeybytes 40 to 40statusu8bytes 41 to 48entry sizeu64bytes 49 to 56entry costu64bytes 57 to 64exit sizeu64bytes 65 to 72exit valueu64bytes 73 to 80payment lamportsu64bytes 81 to 84relapse countu32bytes 85 to 99reserved[u8; 15]

fig. 4 · The wallet record account as the program lays it out. One record per wallet, created on its first buy, written on every classified trade, never deleted.

Instruction flow

swap observedclassifyentry: create record, status openadd: raise size and costexit: write exit, compute payment,transfer from reserve, status retiredrelapse: increment count, status relapsedfee claimreservesol insol out

fig. 5 · Every path through the program begins with a trade or a fee claim. Nothing begins with time.

Verification

This page is drawn from the program's own account layout. The byte map is the record each wallet gets on its first buy, and the flow is the set of paths an instruction can take. If a number on this site ever disagrees with the chain, the chain is right and the number is a display bug; the program does not read from this site.