Six proof-of-concept Solana applications, modeled and verified in pure Lean 4 — now with front ends.
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.
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.
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.
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…
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.
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.
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.
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.