Lean Solana PoCs

Five proof-of-concept Solana applications, modeled and verified in pure Lean 4 — now with front ends.

What these pages are: interactive front ends for the Lean models in Poc/. The Lean binaries remain the source of truth — the JavaScript on each page mirrors the Lean math so you can poke at it in a browser, but the JS itself is not verified. Nothing here touches a wallet, signs anything, or talks to mainnet (or any network). Where a page shows numbers, they are the Lean demo/test vectors, so you can cross-check them against the binaries yourself.
Devnet (deployed; bytecode proofs still being checked): Airdrop and p-token are backed by real SolanaOS programs written in Lean (source), compiled to sBPF by lean-svm. Their bytecode-level proofs are still being checked and they are deployed on devnet only (status: LAUNCH.md). Connect a wallet on those pages to sign real devnet transactions. Mainnet is shown but disabled until launch; AMM and swap stay simulated until their CPI proofs land; perps stay a paper desk.

Perps paper desk

Feed sample marks, open paper longs/shorts with leverage, watch PnL, funding and the liquidation estimate, close out. Integer micro-unit math identical to Poc/Perps.lean — including the demo that closes SOL long for +$99.90.

x402 pay-per-call

Step through the 402 flow: request → challenge → payment payload → retry → paid content, with the real header bytes (428 chars, byte-identical to the Lean/Python PoCs). Settlement is a shape-check stub — stated on the page.

Compressed airdrop devnet

Edit a recipient list, compute its SHA-256 Merkle root in the browser, generate and verify inclusion proofs — and flip the tamper switch to watch verification fail. Canonical example matches the Lean root 84e5ab90…

AMM 4 theorems proven

Live constant-product simulator: add/remove liquidity, swap with a fee slider, watch k only grow, and see the x·y=k curve move. The four safety properties are proven in Poc/Amm.lean — listed on the page.

Swap router

Direct vs two-hop quotes side by side on the Poc/Swap.lean pools — two-hop wins 828 vs 499 against the shallow pool — with exact-out inversion and slippage/deadline guards that visibly reject.

Dark pool theorems proven

Commit → match → settle: orders hidden as SHA-256 commitments, price-time priority matching, and a 16-check settlement gate that only settles when the reveals open the commitments. Conservation and no-skip matching are proven in Poc/DarkPool.lean — the page replays the Lean demo and lets you poke the gate.

Attestations theorems proven

The Solana Attestation Service (credentials, schemas, attestations) rewritten for dark DeFi: commitment-only on-chain records with no plaintext data field, selective disclosure of a single field, and one-show nullifier presentation to a dark gate. Double-presentation impossibility is proven in Poc/Attestations.lean.

RWA & tokenized equities theorems proven

Sunrise-issued tokenized equities (Backpack Securities): the on-chain issuer fingerprint that excludes xStocks, the backing law supply ≤ custody preserved across mint / redeem / split, and a Backpack cross-venue quote gate — proven in Poc/Rwa.lean. Model only; SAMPLE prices; no live execution.

p-token 48 theorems proven devnet

Anza's Pinocchio rewrite of SPL Token (SIMD-0266), modeled in Poc/PToken.lean: the full core instruction set plus batch, withdraw-excess-lamports and unwrap — supply conservation, delegate rules, freeze gating, batch atomicity and irreversible renunciation, all kernel-checked. Demo 54/54.