Built with Percolator
Toly's formally verified risk engine, integrated directly into SML via cross-program invocation.
Percolator is a formally verified risk engine for perpetual futures on Solana, created by Anatoly Yakovenko (Toly). It enforces balance-sheet solvency invariants at the program level — meaning the math is proven correct, not just tested.
SuperMemeLiquid uses Percolator via cross-program invocation (CPI) for risk management on select markets. The clearinghouse acts as the vault authority and invokes Percolator instructions with signed PDA seeds — your funds are managed by verified on-chain logic, not backend servers.
Layer 1 — Oracle Guard: Validates Pyth price feeds for staleness, confidence intervals, and deviation before any trade.
Layer 2 — Percolator: Enforces balance-sheet solvency, haircut ratios, and position limits at the risk engine level.
set_percolator_configAdmin configures Percolator program ID, slab address, vault, and oracle index for a market.
init_percolator_userInitializes a user account on the Percolator slab via CPI. Required before any deposit or trade.
deposit_percolatorDeposits USDC collateral from the clearinghouse vault into the Percolator slab for margin.
withdraw_percolatorWithdraws collateral back from Percolator to the clearinghouse vault. Oracle-checked.
execute_percolator_tradeRoutes a trade through Percolator's TradeCpi path with LP PDA derivation and matcher program validation.
Each CPI call validates program IDs, PDA derivations, and sysvar accounts before invocation. The clearinghouse never holds signing authority over the Percolator slab directly — it uses invoke_signed with its own vault authority seeds.
Both programs are deployed on Solana devnet. Verify the code, inspect the accounts, trust the math.