Lean Directory

Every Lean tool for Solana, one API.

A public directory of Lean 4 projects for Solana whose claims are machine-checked: the core packages are verified in the directory's own pipeline — Lake build green, theorem counts audited, zero sorry — and the ecosystem entries are indexed from their public repositories. Counts on this page are the directory's own data (registry generated 2026-12-05, toolchain leanprover/lean4:v4.36.0), not marketing copy.

20projects listed
7core · verified
13ecosystem · indexed
202theorems (core)
0sorrys (core)
38Lean files audited

The directory

Search by name or description, filter by tier or category. Core cards expand to the full per-file theorem surface the directory verified.

@leansvm/agent-guard

0.3.0
core · verifiedAgentsMIT

Lean 4 money-math, rent-floor, slippage, lease, reconciliation, Solana wire-format and transaction-firewall proofs paired with a static JS/TS money-bug scanner, a pre-sign transaction firewall, and a 7-tool stdio MCP server for AI coding agents.

46 theorems46 checked0 sorry8 Lean files
toolchain leanprover/lean4:v4.36.0
8 files · 46 theorems — show the proof surface
AgentGuard/Firewall.lean 7 theorems
  • AgentGuard.Firewall.durable_nonce_with_admin_blocked
  • AgentGuard.Firewall.unknown_discriminant_blocked
  • AgentGuard.Firewall.unlisted_program_blocked
  • AgentGuard.Firewall.authority_operations_blocked
  • AgentGuard.Firewall.allowed_outflow_within_cap
  • AgentGuard.Firewall.allowed_debit_within_cap
  • AgentGuard.Firewall.adding_instructions_never_unblocks
AgentGuard/Lease.lean 5 theorems
  • AgentGuard.Lease.lease_lock_monotonic
  • AgentGuard.Lease.lease_prevents_concurrent_acquire
  • AgentGuard.Lease.lease_reacquirable_after_expiry
  • AgentGuard.Lease.intent_before_sign_unique
  • AgentGuard.Lease.intent_settle_preserves_settled
AgentGuard/MoneyMath.lean 12 theorems
  • AgentGuard.MoneyMath.floor_share_mul_le
  • AgentGuard.MoneyMath.floor_share_le_pool
  • AgentGuard.MoneyMath.sum_floor_shares_mul_le
  • AgentGuard.MoneyMath.sum_floor_shares_le_pool
  • AgentGuard.MoneyMath.lamport_split_conserved
  • AgentGuard.MoneyMath.carry_bounded_by_pool
  • AgentGuard.MoneyMath.bps_fee_bounded
  • AgentGuard.MoneyMath.bps_fee_plus_net
  • AgentGuard.MoneyMath.bps_fee_zero
  • AgentGuard.MoneyMath.bps_fee_full
  • AgentGuard.MoneyMath.reserve_floor_preserved
  • AgentGuard.MoneyMath.reserve_withdrawal_conserved
AgentGuard/Reconciliation.lean 5 theorems
  • AgentGuard.Reconciliation.books_balance_exact
  • AgentGuard.Reconciliation.payer_own_sol_preserved
  • AgentGuard.Reconciliation.zero_paid_keeps_full_carry
  • AgentGuard.Reconciliation.incremental_payout_preserves_books
  • AgentGuard.Reconciliation.derived_carry_le_distributable
AgentGuard/Slippage.lean 6 theorems
  • AgentGuard.Slippage.abs_diff_self
  • AgentGuard.Slippage.abs_diff_symm
  • AgentGuard.Slippage.slippage_equal_prices_accepted
  • AgentGuard.Slippage.slippage_guard_sound
  • AgentGuard.Slippage.slippage_guard_rejects_excess
  • AgentGuard.Slippage.slippage_guard_rejects_zero_pool
AgentGuard/Transaction.lean 7 theorems
  • AgentGuard.Transaction.payout_meets_rent_floor
  • AgentGuard.Transaction.tx_cap_enforced
  • AgentGuard.Transaction.allowlist_program_permitted
  • AgentGuard.Transaction.withdraw_destination_locked
  • AgentGuard.Transaction.tx_policy_all_safe
  • AgentGuard.Transaction.tx_policy_rejects_below_rent
  • AgentGuard.Transaction.tx_policy_rejects_over_cap
AgentGuard/WireFormat.lean 4 theorems
  • AgentGuard.WireFormat.compact_u16_roundtrip
  • AgentGuard.WireFormat.compact_u16_canonical
  • AgentGuard.WireFormat.message_version_dispatch_sound
  • AgentGuard.WireFormat.alt_index_bounds_sound
AgentGuard.lean 0 theorems
github.com/Solizardking/lean-directory/tree/main/packages/agent-guard ↗

@leansvm/amm-math

0.1.0
core · verifiedDeFi / AMMMIT

Lean 4 AMM maths pinned to Raydium CP-Swap and CLMM: k never decreases, swap, LP and CLMM step rounding favour the pool, checked arithmetic matches the spec, and tick prices are bounded with verbatim constants.

25 theorems25 checked0 sorry5 Lean files
toolchain leanprover/lean4:v4.36.0
5 files · 25 theorems — show the proof surface
AmmMath/ClmmStep.lean 4 theorems
  • AmmMath.ClmmStep.swap_step_amount_in_rounds_up
  • AmmMath.ClmmStep.swap_step_amount_out_rounds_down
  • AmmMath.ClmmStep.swap_step_next_sqrt_price_favors_pool
  • AmmMath.ClmmStep.swap_step_input_within_budget
AmmMath/ConstantProduct.lean 14 theorems
  • AmmMath.ConstantProduct.swap_out_lt_reserve
  • AmmMath.ConstantProduct.swap_out_rounds_down
  • AmmMath.ConstantProduct.swap_k_nondecreasing
  • AmmMath.ConstantProduct.swap_roundtrip_no_free_value
  • AmmMath.ConstantProduct.swap_exact_out_input_rounds_up
  • AmmMath.ConstantProduct.swap_exact_out_k_nondecreasing
  • AmmMath.ConstantProduct.swap_exact_out_covers_target
  • AmmMath.ConstantProduct.lp_deposit_rounds_up
  • AmmMath.ConstantProduct.lp_withdraw_rounds_down
  • AmmMath.ConstantProduct.lp_deposit_share_value_nondecreasing
  • AmmMath.ConstantProduct.lp_withdraw_share_value_nondecreasing
  • AmmMath.ConstantProduct.lp_deposit_then_withdraw_no_profit
  • AmmMath.ConstantProduct.swap_out_checked_sound
  • AmmMath.ConstantProduct.swap_out_checked_total
AmmMath/SqrtPrice.lean 4 theorems
  • AmmMath.SqrtPrice.amount0_delta_checked_exact
  • AmmMath.SqrtPrice.amount1_delta_checked_exact
  • AmmMath.SqrtPrice.add_then_remove_liquidity_no_profit
  • AmmMath.SqrtPrice.split_range_payout_le_unsplit
AmmMath/TickMath.lean 3 theorems
  • AmmMath.TickMath.sqrt_price_at_extreme_ticks
  • AmmMath.TickMath.sqrt_price_at_tick_well_defined
  • AmmMath.TickMath.tick_factor_steps_monotone
AmmMath.lean 0 theorems
github.com/Solizardking/lean-directory/tree/main/packages/amm-math ↗

@leansvm/borsh-lean

0.2.0
core · verifiedSerializationMIT

Formal Borsh and Solana binary serialization library in Lean 4 proving little-endian integer roundtrips, 36-byte COption<Pubkey>, Anchor discriminators, and bounded BorshVec layouts.

25 theorems25 checked0 sorry3 Lean files
toolchain leanprover/lean4:v4.36.0
3 files · 25 theorems — show the proof surface
BorshLean/Primitives.lean 14 theorems
  • BorshLean.Primitives.u8_len
  • BorshLean.Primitives.u16_len
  • BorshLean.Primitives.u32_len
  • BorshLean.Primitives.u64_len
  • BorshLean.Primitives.bool_len
  • BorshLean.Primitives.u8_roundtrip
  • BorshLean.Primitives.u16_roundtrip
  • BorshLean.Primitives.u32_roundtrip
  • BorshLean.Primitives.u64_roundtrip
  • BorshLean.Primitives.bool_roundtrip
  • BorshLean.Primitives.bool_rejects_invalid_tag
  • BorshLean.Primitives.u16_rejects_short
  • BorshLean.Primitives.u32_rejects_short
  • BorshLean.Primitives.u64_rejects_short
BorshLean/Solana.lean 11 theorems
  • BorshLean.Solana.coption_none_len
  • BorshLean.Solana.coption_some_len
  • BorshLean.Solana.coption_roundtrip
  • BorshLean.Solana.coption_rejects_bad_tag
  • BorshLean.Solana.coption_rejects_short
  • BorshLean.Solana.discriminator_match_sound
  • BorshLean.Solana.discriminator_match_prefix
  • BorshLean.Solana.discriminator_rejects_short
  • BorshLean.Solana.borsh_vec_len_exact
  • BorshLean.Solana.borsh_vec_roundtrip
  • BorshLean.Solana.borsh_vec_rejects_over_bound
BorshLean.lean 0 theorems
github.com/Solizardking/lean-directory/tree/main/packages/borsh-lean ↗

@leansvm/mint-proof

0.3.0
core · verifiedTokensMIT

Decodes SPL Token and Token-2022 mints (TLV extensions with payloads, transfer-fee schedules), pump.fun bonding curves and fee-sharing configs bound to their canonical PDA, and emits standalone Lean 4 certificates.

37 theorems37 checked0 sorry6 Lean files
toolchain leanprover/lean4:v4.36.0
6 files · 37 theorems — show the proof surface
MintProof/Curve.lean 6 theorems
  • MintProof.curve_complete_iff
  • MintProof.curve_decoded_layout_valid
  • MintProof.curve_active_has_reserves
  • MintProof.curve_supply_positive_valid
  • MintProof.curve_graduated_no_bonding_trades
  • MintProof.curve_safe_sound
MintProof/Extensions.lean 7 theorems
  • MintProof.no_dangerous_extensions_iff
  • MintProof.permanent_delegate_unsafe
  • MintProof.transfer_hook_flagged
  • MintProof.transfer_fee_unsafe
  • MintProof.default_account_state_unsafe
  • MintProof.unknown_extension_blocks_clean_classification
  • MintProof.strict_token2022_safety_sound
MintProof/Layout.lean 1 theorems
  • MintProof.readBytes_size
MintProof/Safety.lean 16 theorems
  • MintProof.mint_authority_revoked_iff
  • MintProof.freeze_authority_revoked_iff
  • MintProof.mint_authority_revoked
  • MintProof.freeze_authority_revoked
  • MintProof.mint_initialized_valid
  • MintProof.safe_mint_implies_fixed_supply
  • MintProof.fee_shares_valid_sum
  • MintProof.shareholder_bps_le_total
  • MintProof.fee_shares_sum_valid_bounded
  • MintProof.fee_admin_locked
  • MintProof.fee_admin_locked_immutable
  • MintProof.empty_shares_sum_zero
  • MintProof.single_shareholder_full_bps
  • MintProof.mint_safety_sound
  • MintProof.combined_launch_safety
  • MintProof.fee_config_binding_sound
MintProof/TransferFee.lean 7 theorems
  • MintProof.transfer_fee_config_payload_size
  • MintProof.transfer_fee_bounded
  • MintProof.transfer_net_plus_fee_exact
  • MintProof.scheduled_fee_detected
  • MintProof.fee_authority_revoked_immutable
  • MintProof.set_transfer_fee_delayed_two_epochs
  • MintProof.transfer_fee_safe_sound
MintProof.lean 0 theorems
github.com/Solizardking/lean-directory/tree/main/packages/mint-proof ↗

@leansvm/share-math

0.1.0
core · verifiedVaultsMIT

Lean 4 vault share math with virtual offsets: rounding favours the vault on all four operations, share price never falls over any trace, zero-share deposits are rejected, and a single-victim first-depositor attack is unprofitable.

17 theorems17 checked0 sorry6 Lean files
toolchain leanprover/lean4:v4.36.0
6 files · 17 theorems — show the proof surface
ShareMath/Conversion.lean 9 theorems
  • ShareMath.deposit_then_redeem_no_profit
  • ShareMath.mint_ceil_ge_deposit_assets
  • ShareMath.withdraw_burns_at_least_redeem_shares
  • ShareMath.zero_share_deposit_rejected
  • ShareMath.deposit_share_price_nondecreasing
  • ShareMath.mint_share_price_nondecreasing
  • ShareMath.withdraw_share_price_nondecreasing
  • ShareMath.redeem_share_price_nondecreasing
  • ShareMath.deposit_loss_lt_one_share
ShareMath/Inflation.lean 3 theorems
  • ShareMath.first_depositor_attack_no_profit
  • ShareMath.multi_victim_zero_share_rejected_no_profit
  • ShareMath.zero_offset_inflation_attack_witness
ShareMath/MulDiv.lean 2 theorems
  • ShareMath.mulDivFloorChecked_sound
  • ShareMath.mulDivCeilChecked_sound
ShareMath/StakePool.lean 0 theorems
ShareMath/Traces.lean 3 theorems
  • ShareMath.trace_preserves_share_price
  • ShareMath.trace_preserves_ratio_invariant
  • ShareMath.redeem_le_total_assets_reachable
ShareMath.lean 0 theorems
github.com/Solizardking/lean-directory/tree/main/packages/share-math ↗

@leansvm/svm-model

0.2.0
core · verifiedSVM modelMIT

Formal Solana Virtual Machine (SVM) account, rent-exemption, owner-only debit/write, readonly/executable immutability, CPI privilege non-escalation, and multi-ix lamport conservation proofs.

24 theorems24 checked0 sorry4 Lean files
toolchain leanprover/lean4:v4.36.0
4 files · 24 theorems — show the proof surface
SvmModel/Account.lean 5 theorems
  • SvmModel.Account.rent_exempt_zero_bytes_exact
  • SvmModel.Account.rent_exempt_spl_mint_exact
  • SvmModel.Account.rent_exempt_spl_token_account_exact
  • SvmModel.Account.rent_exempt_monotonic
  • SvmModel.Account.rent_exempt_positive
SvmModel/Execution.lean 14 theorems
  • SvmModel.Execution.transfer_conserves_lamports
  • SvmModel.Execution.transfer_requires_owner
  • SvmModel.Execution.transfer_requires_signer
  • SvmModel.Execution.transfer_requires_writable
  • SvmModel.Execution.transfer_rejects_overdraft
  • SvmModel.Execution.transfer_rejects_executable
  • SvmModel.Execution.non_owner_cannot_mutate_data
  • SvmModel.Execution.readonly_account_immutable
  • SvmModel.Execution.executable_account_immutable
  • SvmModel.Execution.mutate_data_preserves_lamports
  • SvmModel.Execution.cpi_no_signer_escalation
  • SvmModel.Execution.cpi_no_writable_escalation
  • SvmModel.Execution.runIx_conserves_total_lamports
  • SvmModel.Execution.batch_conserves_total_lamports
SvmModel/Transfer.lean 5 theorems
  • SvmModel.Transfer.transferLamports_refines
  • SvmModel.Transfer.transferLamports_of_model
  • SvmModel.Transfer.transferLamports_conserves
  • SvmModel.Transfer.transferLamports_rejects_self
  • SvmModel.Transfer.transferLamports_rejects_overflow
SvmModel.lean 0 theorems
github.com/Solizardking/lean-directory/tree/main/packages/svm-model ↗

@leansvm/vault-specs

0.2.0
core · verifiedVaultsMIT

Machine-checked Lean 4 specifications for Solana TokenVault, FeeSplitter, Escrow, TimeLockVault, and multi-step Traces with Anchor templates and 6 verified exploit rejections.

28 theorems28 checked0 sorry6 Lean files
toolchain leanprover/lean4:v4.36.0
6 files · 28 theorems — show the proof surface
VaultSpecs/Escrow.lean 6 theorems
  • VaultSpecs.Escrow.settle_conserves_value
  • VaultSpecs.Escrow.cancel_refunds_maker_only
  • VaultSpecs.Escrow.cancel_conserves_value
  • VaultSpecs.Escrow.no_double_settle
  • VaultSpecs.Escrow.no_settle_after_cancel
  • VaultSpecs.Escrow.no_cancel_after_settle
VaultSpecs/FeeSplitter.lean 6 theorems
  • VaultSpecs.FeeSplitter.split_bps_sum_valid
  • VaultSpecs.FeeSplitter.split_never_overpays
  • VaultSpecs.FeeSplitter.split_conserves_lamports
  • VaultSpecs.FeeSplitter.zero_pool_noop
  • VaultSpecs.FeeSplitter.split_empties_pool
  • VaultSpecs.FeeSplitter.split_multi_round_conserves_lamports
VaultSpecs/TimeLockVault.lean 6 theorems
  • VaultSpecs.TimeLockVault.no_claim_before_cliff
  • VaultSpecs.TimeLockVault.vested_bounded_by_total
  • VaultSpecs.TimeLockVault.claim_requires_beneficiary
  • VaultSpecs.TimeLockVault.claimed_never_exceeds_vested
  • VaultSpecs.TimeLockVault.full_vest_at_end_slot
  • VaultSpecs.TimeLockVault.claim_preserves_schedule
VaultSpecs/TokenVault.lean 6 theorems
  • VaultSpecs.TokenVault.withdraw_requires_authority
  • VaultSpecs.TokenVault.withdraw_conserves_total
  • VaultSpecs.TokenVault.deposit_preserves_authority
  • VaultSpecs.TokenVault.locked_vault_blocks_withdraw
  • VaultSpecs.TokenVault.withdraw_never_overdraws
  • VaultSpecs.TokenVault.deposit_then_withdraw_roundtrip
VaultSpecs/Traces.lean 4 theorems
  • VaultSpecs.Traces.vault_trace_preserves_authority
  • VaultSpecs.Traces.vault_trace_conserves_solvency
  • VaultSpecs.Traces.vault_trace_lock_is_permanent
  • VaultSpecs.Traces.vault_trace_total_withdrawn_le_deposited
VaultSpecs.lean 0 theorems
github.com/Solizardking/lean-directory/tree/main/packages/vault-specs ↗

solana-foundation/leanprover-solanalib

main
ecosystem · indexedSVM modelApache-2.0★ 10

Lean 4 toolbox from the solana-foundation GitHub org, modeling Solana runtime concepts, accounts, and SDK primitives.

external project — indexed from its GitHub metadata; no theorem count claimed by the directory
toolchain leanprover/lean4:v4.34.0
github.com/solana-foundation/leanprover-solanalib ↗

AeneasVerif/aeneas

main
ecosystem · indexedRust → Lean bridgeApache-2.0★ 1330

Rust-to-Lean 4 verification toolchain translating safe Rust (via Charon LLBC) into pure functional Lean 4 models.

external project — indexed from its GitHub metadata; no theorem count claimed by the directory
toolchain lean4-backend
github.com/AeneasVerif/aeneas ↗

AeneasVerif/charon

main
ecosystem · indexedRust → Lean bridgeApache-2.0★ 503

Extracts Rust crates into Low-Level Borrow Calculus (LLBC) ASTs for downstream Lean 4 translation with Aeneas.

external project — indexed from its GitHub metadata; no theorem count claimed by the directory
toolchain aeneas-frontend
github.com/AeneasVerif/charon ↗

Certora/lusterna

main
ecosystem · indexedRust → Lean bridgeMIT★ 11

Certora's Rust-to-Lean formal verification harness orchestrating Charon, Aeneas, and Lean 4 proof generation.

external project — indexed from its GitHub metadata; no theorem count claimed by the directory
toolchain charon+aeneas+lean4
github.com/Certora/lusterna ↗

QEDGen/qedsvm

main
ecosystem · indexedSVM modelMIT★ 21

Lean 4 reference model of the Solana Virtual Machine for executing and verifying compiled sBPF programs.

external project — indexed from its GitHub metadata; no theorem count claimed by the directory
toolchain leanprover/lean4:v4.30.0
github.com/QEDGen/qedsvm ↗

QEDGen/solana-skills

main
ecosystem · indexedAgentsMIT★ 71

Specification, property testing, Kani, and Lean 4 verification workflows for Anchor, Quasar, and Pinocchio programs.

external project — indexed from its GitHub metadata; no theorem count claimed by the directory
toolchain lean4+kani
github.com/QEDGen/solana-skills ↗

MidTermDev/lean-Solana-client

main
ecosystem · indexedSVM modelMIT★ 20

Open-source Solana validator client and gossip node written in Lean 4 with kernel-checked bounds safety.

external project — indexed from its GitHub metadata; no theorem count claimed by the directory
toolchain leanprover/lean4:v4.36.0
github.com/MidTermDev/lean-Solana-client ↗

MidTermDev/lean-solana-kit

main
ecosystem · indexedSVM modelApache-2.0★ 0

Write Solana programs in Lean and prove them: proven building blocks, the lsk CLI (new, build, test, prove, deploy, verify) and automatic proofs that the compiled sBPF refines the Lean source for programs within the prover's reach.

external project — indexed from its GitHub metadata; no theorem count claimed by the directory
toolchain leanprover/lean4:v4.36.0
github.com/MidTermDev/lean-solana-kit ↗

dennj/solana-lean

master
ecosystem · indexedSVM modelApache-2.0★ 4

Modified Lean 4 compiler targeting Solana SBF and WebAssembly directly from verified Lean code.

external project — indexed from its GitHub metadata; no theorem count claimed by the directory
toolchain custom-stage1
github.com/dennj/solana-lean ↗

Beneficial-AI-Foundation/curve25519-dalek-lean-verify

master
ecosystem · indexedCryptographyApache-2.0★ 14

Formal verification of Rust's curve25519-dalek (Solana's Ed25519 signature curve) using Aeneas and Lean 4.

external project — indexed from its GitHub metadata; no theorem count claimed by the directory
toolchain leanprover/lean4:v4.31.0· uses Mathlib
github.com/Beneficial-AI-Foundation/curve25519-dalek-lean-verify ↗

Verified-zkEVM/VCVio

main
ecosystem · indexedCryptographyApache-2.0★ 184

Lean 4.36.0 library for machine-checked cryptographic protocol proofs via oracle game-hopping.

external project — indexed from its GitHub metadata; no theorem count claimed by the directory
toolchain leanprover/lean4:v4.36.0· uses Mathlib
github.com/Verified-zkEVM/VCVio ↗

reilabs/proven-zk

main
ecosystem · indexedCryptographyApache-2.0★ 52

Lean 4 verification library for zero-knowledge circuits, finite field arithmetic, and Merkle tree constraints.

external project — indexed from its GitHub metadata; no theorem count claimed by the directory
toolchain leanprover/lean4:v4.29.1· uses Mathlib
github.com/reilabs/proven-zk ↗

aeyakovenko/lean-svm

main
ecosystem · indexedSVM modelApache-2.0★ 70

Compiler from Lean 4 to Solana sBPF v3: write a program in Lean, prove its invariants, and compile it to a .so with no LLVM or C runtime. Research use, not audited.

external project — indexed from its GitHub metadata; no theorem count claimed by the directory
toolchain leanprover/lean4:v4.36.0
github.com/aeyakovenko/lean-svm ↗

No projects match that filter.

The SolanaOS / Clawd proof ledger

Our own Lean projects, counted live by the same aggregator behind pq.clawdcompute.us and the Lean Explorer (live via aggregate.clawdcompute.us, generated 2026-12-06). These are not directory entries yet: pull requests adding solana-os-pq, solanaOS-lean and lean-solana-client to the upstream directory are open (PRs #2–#4 on kaylum54/lean-directory). Shown here so the ledger is visible next to the directory it is joining.

ProjectStatementsProvedSorry open
Solana-OS-PQ Registry (Lean model) 35296 open
Son of Anton (vault accounting proofs) 43430
Lean Solana Client (ours) 1191190
SolanaOS-Lean (sBPF semantics) 2972970
clawd-sbpf-spec 16160
clawd-zk-verify 880
Total (ours)518512 6 open

API