Rules
The whole machine in seven rules. A keeper wallet reads the trades of $PACHI and does exactly this; nothing runs on a clock, and nobody chooses where a ball lands.
- 1
A buy drops balls
A buy of 0.01 SOL or more drops one ball per 0.05 SOL, at least 1 and at most 20. 0.03 SOL drops 1 ball, 0.25 SOL drops 5, 1 SOL or more drops 20. The keeper's own trades drop nothing.
- 2
The seed
Ball i of a trade gets
h = sha256(signature ‖ blockhash ‖ part ‖ i), with the blockhash of the first block at slot + 2 or later. That block did not exist when the buyer signed, so nobody can pick a signature that lands on their own lane. U = the first 6 bytes of h. - 3
The tulip and FEVER
When U falls in the first 1/64 of its range, the ball hits the tulip: FEVER starts for the next 16 lane balls, and 5% of the pot goes to the burn jar.
- 4
The lanes
Otherwise U picks a lane on the rail. The lanes are the top 48 holders with 100 000 $PACHI or more, sorted by address, each as wide as its share of their balances, capped at 10%. A lane ball puts 0.5% of the pot in that wallet's tray, 1.5% during FEVER.
- 5
A sell drains
A sell of 0.01 SOL or more slams the tulip shut (FEVER ends) and sends the next balls to the drain: one per 0.1 SOL sold, at least 1 and at most 5 per sell, at most 10 waiting. A drained ball pays nothing; its share stays in the pot.
- 6
The tray spills
When all trays together hold 0.1 SOL, the keeper sends every tray of 0.001 SOL or more to its wallet, 15 transfers per transaction, with a memo
pachi spillthat carries the hash of the list. The book is written before anything is sent, so a restart never pays twice. - 7
The pot and the jar
The pot is the keeper's SOL minus a 0.05 SOL reserve for network fees, the trays and the jar. It grows when the creator fees of $PACHI are forwarded to the keeper. When the jar reaches 0.05 SOL the keeper buys $PACHI with it and burns every token it bought, memo
pachi burn.
Check a ball
Recompute any ball in your browser. Paste the trade's signature and the blockhash of the block two slots later (Solscan shows the slot of the trade; open block slot + 2), or take a ball from the recording.