Presenting percli v1.0.
Percolator has been the quietest big idea in perps:
@toly's formally verified risk engine whose core invariant – no user can ever withdraw more value than the exchange actually holds – replaces ADL queues with fair, proportional loss socialization. No bailouts, no queue-jumping, no asymmetric outcomes when markets tear.
percli is the toolchain around it.
An offline simulator to explore haircuts, liquidations, funding, and conservation proofs without touching a chain. A Solana on-chain program that ships the engine as a real market. A CLI that does both – percli sim for scenarios, percli chain for deployment and operations, percli keeper for cranks and liquidations.
v1.0 is the production cut.
→ In-place v0→v1 market header migration. Rewritten via copy_within, no realloc, no rent top-up, no downtime. PDA bumps re-validated against find_program_address so corrupted accounts are refused before any byte is touched.
→ Two-step authority transfer. Self-transfer rejected. Pubkey::default() cancels a pending handoff and emits a distinct event. Pending authority must sign to accept.
→ Full ABI reference (ABI.md): 19 instructions, Borsh layouts, account-data layout, PDA derivations, every error code 6000–6019, discriminator table, Python verification snippet.
→ Operator handbook (DEPLOYMENT.md): devnet deploy, market init, program upgrades, v0.9→v1.0 migration, two-step handover, mainnet checklist, troubleshooting keyed on every error code.
→ 42 integration tests, Kani proof suite reorganized across six topic files, 20 engineering unit tests.
Install:
cargo install percli
percli init > scenario.toml
percli sim scenario.toml
github.com/kamiyoai/percli