Built with Percolator

Toly's formally verified risk engine, integrated directly into SML via cross-program invocation.

What is Percolator?
by Anatoly Yakovenko

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.

Balance-sheet solvencyEnforced per-slab, every instruction
Warmup periodsPrevents flash-loan manipulation
Haircut ratiosRisk-weighted collateral accounting
Slab architectureUp to 4,096 accounts per market slab
Keeper crankPermissionless liquidation + settlement
View on GitHubaeyakovenko/percolator
SML + Percolator Integration
Dual-layer protection

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.

Dual-Layer Protection

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.

CPI Instructions
set_percolator_config

Admin configures Percolator program ID, slab address, vault, and oracle index for a market.

init_percolator_user

Initializes a user account on the Percolator slab via CPI. Required before any deposit or trade.

deposit_percolator

Deposits USDC collateral from the clearinghouse vault into the Percolator slab for margin.

withdraw_percolator

Withdraws collateral back from Percolator to the clearinghouse vault. Oracle-checked.

execute_percolator_trade

Routes 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.

On-Chain Verification
devnet