Formal methods

Protocol rules: proven.
Whole wallet: no.

OpenCSV machine-checks the rules that prevent inflation, value creation, and quiet double spends. It does not pretend that Lean has proved Bitcoin, Poseidon2, the AIR prover, storage, networking, or application software.

72Lean specification declarations
audited separately
15Aeneas translated-Rust refinements
narrow kernel only
0Tracked sorry or admit
enforced by CI
6+Runtime and cryptographic surfaces
not mechanized
01 / COVERAGE

Coverage by layer

Select a layer to see its exact status, proof boundary, pinned source, and receipt.

Machine-checked

The protocol state machine and its load-bearing invariants.

Seventy-two separately audited declarations cover genesis→mint→transfer→redeem, supply, conservation, first occurrence, receiver acceptance, value arithmetic, scan exclusion, batching, one-input forwarding, and recursive lineage. The project is dependency-free Lean 4 and CI rejects sorry, admit, or axiom drift.

02 / EXTERNAL FOUNDATIONS

External assumptions

The protocol theorems depend on these named security assumptions, which are not mechanized.

Assumed cryptographic security

Poseidon2

Provides commitment, owner/nullifier, anchor-binding, and proof-system hashing. Lean reasons from injectivity, binding, and preimage-resistance hypotheses; it does not mechanize cryptanalysis of the concrete permutation.

POSEIDON2 PAPER ↗
LEAN HASH AXIOMS ↗
Assumed proof-system soundness

FRI + recursion

The receiver theorem calls an abstract sound proof system. FRI parameters, predecessor-key binding, version boundaries, and adversarial rejection are implemented and tested; Lean does not prove the concrete verifier. D5 remains open: the v4 root key is self-described by proof common data and is not independently authenticated, so v4 cannot activate mainnet.

PINNED PROVER SOURCE ↗
D5 ROOT-KEY GATE ↗
PAPER BOUNDARY ↗
External consensus security

Bitcoin

Orders anchors and gives confirmations. OpenCSV verifies its local view and proves scan semantics, but assumes Bitcoin's proof-of-work security and a chosen confirmation depth against reorganizations.

BITCOIN SECURITY MODEL ↗
SCAN MODEL ↗
03 / THREE LOAD-BEARING CLAIMS

The three main guarantees

The full ledgers are below. These are the three claims a receiver needs.

04 / FAILURE-MODE TABLE

Assumptions and failure modes

Each assumption is listed with what breaks if it fails and the mitigation.

You trust that…If it breaks…Mitigation
Poseidon2 hashes are collision-resistantcounterfeiting becomes possibleconservative parameters; swap hash without protocol change
The FRI proof system is soundfake validity proofs could passtransparent setup; audits re-check proofs publicly
The issuer keeps its mint seed safeinflation — but visible, never hiddenpublic mint stream; explicit asset migration/rotation
Your verified Bitcoin header/filter/block view is currenta spend or reorg could be missedmulti-peer proof-of-work validation; explorers are hints only
Bitcoin isn't reorged past k confirmationsaccepted payments can be undonesame assumption as any Bitcoin payment
05 / HEADLINE THEOREMS

Headline theorems

Four results about the protocol logic — the layer where catastrophic bugs (inflation, double-spend acceptance) would live, independent of any cryptography. Each links to its Lean source and paper section; each video is from the same generated formal series.

T1Inflation soundness

Along any valid trace, per asset: net value in circulation equals Σ mints − Σ redeems, and every mint carries valid issuer authorization. Nobody prints money — not the users, not a forger, and not the issuer beyond its own signed, publicly anchored mints. Paper §5.1.

T2Conservation

Every transfer step preserves per-asset totals: outputs sum to inputs, so shielded transfers can neither create nor destroy value — which is what makes the public mint/redeem stream an exact audit of supply. Paper §4.5.

T3Nullifier uniqueness & first occurrence

One coin yields exactly one nullifier, so a double-spend is an observable conflict to anyone holding nf (owner and consignment recipients), and the first occurrence resolves it deterministically: two recipients cannot both finally accept. On-chain payloads are context-bound (P = H(nf, ctx)), and both grief directions are theorems: a copied record under a different context is provably invisible (griefer_copy_invisible), and an adversary who doesn't know nf can forge no occurrence at all (no_occurrence_without_knowledge). Paper §5.2, §4.7.

T4Receiver correctness

The receiver's Accept checklist (verify proof, check anchor, check no earlier occurrence, check ownership) succeeds only on transactions that extend a valid trace — recipients can't be fooled into accepting counterfeit coins, modulo proof-system soundness. Paper §4.8, §5.1.

06 / MACHINE-GENERATED LEDGERS

Axiom ledger

Every assumption is an explicitly labeled axiom; the build prints an axiom audit (#print axioms) per theorem.

AssumptionFormUsed by
assetId_injectivecollision resistance of the genesis hashasset binding
commitHash_injectivebinding of coin commitmentscoin identity
ownerKey_injectivecollision resistance of owner = H(osk)T3
sig_unforgeableunforgeability of the abstract issuer authorization; v3 refines this with in-circuit seed knowledgeT1
ProofSystem.soundsoundness of Π, as a structure fieldT4
bindHash_injectivecollision resistance of the anchor payload H(nf, ctx) in both argumentsT3 (conflict soundness)
occurrence_requires_knowledgepreimage resistance: a fresh well-formed entry implies knowledge of nfT3 (anti-grief)

The first-occurrence lemmas are pure list reasoning and depend on no cryptographic axioms. The scan-soundness argument has a short animated explainer: Scan-soundness film.

Specification audit — live from the build

The site checks opencsv-formal every 15 minutes. When its default branch moves, CI rebuilds Lean, reruns the axiom audit, and regenerates this block before publishing. An event hook can refresh it immediately, and a weekly forced rebuild remains as a backstop.

72 / 72 visible
72-declaration specification ledger
TheoremAxiom dependencies
OpenCsv.Batch.allocated_charge_basepropext
OpenCsv.Batch.allocated_charge_highpropext
OpenCsv.Batch.batch_commit_uniquepropext, Classical.choice, OpenCsv.bindHash, OpenCsv.bindHash_injective, Quot.sound
OpenCsv.Batch.batch_exclusion_soundpropext, OpenCsv.bindHash, Quot.sound
OpenCsv.Batch.batch_occurrence_iffOpenCsv.bindHash
OpenCsv.Batch.batch_v2_exclusion_soundpropext, OpenCsv.bindHash, Quot.sound
OpenCsv.Batch.batch_v2_occurrence_iffOpenCsv.bindHash
OpenCsv.Batch.c1_two_party_initial_validpropext, Quot.sound
OpenCsv.Batch.c1_two_party_replacement_conformspropext, Quot.sound
OpenCsv.Batch.c1_two_party_replacement_validpropext, Quot.sound
OpenCsv.Batch.canonical_adjacent_swap_rejectedpropext
OpenCsv.Batch.chainOccurrence_expandWindowpropext, OpenCsv.bindHash, Quot.sound
OpenCsv.Batch.chainOccurrence_expandWindow_v2propext, OpenCsv.bindHash, Quot.sound
OpenCsv.Batch.coordinator_cannot_forgeOpenCsv.KnowsRawNf, OpenCsv.bindHash, OpenCsv.occurrence_requires_knowledge
OpenCsv.Batch.coordinator_envelope_no_occurrenceOpenCsv.KnowsRawNf, OpenCsv.bindHash, OpenCsv.occurrence_requires_knowledge
OpenCsv.Batch.manifest_c1_guardsnone
OpenCsv.Batch.manifest_fixed_positionspropext, OpenCsv.bindHash
OpenCsv.Batch.manifest_participant_alignmentpropext, OpenCsv.bindHash
OpenCsv.Batch.manifest_value_conservationpropext, Quot.sound
OpenCsv.Batch.manifest_vector_lengthspropext, OpenCsv.bindHash
OpenCsv.Batch.max_signed_weight_at_capnone
OpenCsv.Batch.participant_funding_conservationpropext, Quot.sound
OpenCsv.Batch.proposal_id_uniquepropext, OpenCsv.bindHash, OpenCsv.bindHash_injective
OpenCsv.Batch.replacement_monotonenone
OpenCsv.Batch.replacement_preserves_headerOpenCsv.bindHash
OpenCsv.Batch.replacement_preserves_markernone
OpenCsv.Batch.replacement_preserves_stocknone
OpenCsv.Batch.replacement_requires_unanimitynone
OpenCsv.Batch.signer_receipt_freshnone
OpenCsv.Batch.versioned_commit_no_fallbackpropext, OpenCsv.bindHash, OpenCsv.bindHash_injective
OpenCsv.Batch.versioned_commit_uniquepropext, Classical.choice, OpenCsv.bindHash, OpenCsv.bindHash_injective, Quot.sound
OpenCsv.EdgesMatch.lengthspropext, OpenCsv.Sig, Quot.sound
OpenCsv.Encoding.canonical_digest_injectiveQuot.sound
OpenCsv.Encoding.canonical_limb_uniquenone
OpenCsv.Encoding.decode_limb_accepts_canonicalnone
OpenCsv.Encoding.decode_limb_rejects_noncanonicalnone
OpenCsv.Encoding.modular_reduction_has_noncanonical_twinspropext
OpenCsv.Exec.run_soundpropext, OpenCsv.Sig, OpenCsv.SigVerify, OpenCsv.assetId, OpenCsv.commitHash, OpenCsv.nullHash, OpenCsv.ownerKey, Quot.sound
OpenCsv.Scan.anchor_bearing_is_candidatepropext, Quot.sound
OpenCsv.Scan.filter_absence_trustlesspropext, Quot.sound
OpenCsv.Scan.filter_no_false_negativespropext, Quot.sound
OpenCsv.Scan.marker_zero_authorityOpenCsv.bindHash
OpenCsv.Scan.scan_exclusion_soundpropext, OpenCsv.bindHash, Quot.sound
OpenCsv.Scan.served_list_falsifiablepropext, Classical.choice, Quot.sound
OpenCsv.Value.carry_complete_singlepropext, Quot.sound
OpenCsv.Value.carry_soundpropext, Classical.choice, Quot.sound
OpenCsv.Value.difference_interval_within_half_fieldnone
OpenCsv.Value.no_wrappropext, Quot.sound
OpenCsv.Value.range_checked_represents_exactlypropext, Quot.sound
OpenCsv.accepted_trace_supplypropext, OpenCsv.Sig, OpenCsv.SigVerify, OpenCsv.assetId, OpenCsv.bindHash, OpenCsv.commitHash, OpenCsv.nullHash, OpenCsv.ownerKey, Quot.sound
OpenCsv.copied_record_not_wellformedOpenCsv.bindHash, OpenCsv.bindHash_injective
OpenCsv.double_spend_conflictOpenCsv.bindHash, OpenCsv.commitHash, OpenCsv.nullHash, OpenCsv.ownerKey, OpenCsv.ownerKey_injective
OpenCsv.griefer_copy_invisiblepropext, OpenCsv.bindHash, OpenCsv.bindHash_injective
OpenCsv.inflation_soundnesspropext, OpenCsv.Sig, OpenCsv.SigVerify, OpenCsv.assetId, OpenCsv.commitHash, OpenCsv.nullHash, OpenCsv.ownerKey, Quot.sound
OpenCsv.later_occurrence_rejectedOpenCsv.bindHash
OpenCsv.legacy_redeem_lineage_impossiblepropext, OpenCsv.Sig, OpenCsv.SigVerify, OpenCsv.assetId, OpenCsv.commitHash, OpenCsv.nullHash, OpenCsv.ownerKey, Quot.sound
OpenCsv.legacy_transfer_lineage_impossiblepropext, OpenCsv.Sig, OpenCsv.SigVerify, OpenCsv.assetId, OpenCsv.commitHash, OpenCsv.nullHash, OpenCsv.ownerKey
OpenCsv.mints_authorizedpropext, OpenCsv.Sig, OpenCsv.SigVerify, OpenCsv.SignedByIssuer, OpenCsv.assetId, OpenCsv.commitHash, OpenCsv.nullHash, OpenCsv.ownerKey, OpenCsv.sig_unforgeable
OpenCsv.no_occurrence_without_knowledgeOpenCsv.KnowsRawNf, OpenCsv.bindHash, OpenCsv.occurrence_requires_knowledge
OpenCsv.one_input_forwarding_anchor_exactOpenCsv.Sig, OpenCsv.bindHash
OpenCsv.one_input_forwarding_conservationpropext, OpenCsv.Sig, OpenCsv.SigVerify, OpenCsv.assetId, OpenCsv.commitHash, OpenCsv.nullHash, OpenCsv.ownerKey, Quot.sound
OpenCsv.one_input_forwarding_pool_unchangedpropext, OpenCsv.Sig, OpenCsv.SigVerify, OpenCsv.assetId, OpenCsv.commitHash, OpenCsv.nullHash, OpenCsv.ownerKey, Quot.sound
OpenCsv.one_input_forwarding_valid_iffpropext, OpenCsv.Sig, OpenCsv.SigVerify, OpenCsv.assetId, OpenCsv.commitHash, OpenCsv.nullHash, OpenCsv.ownerKey, Quot.sound
OpenCsv.one_input_forwarding_value_equationpropext, OpenCsv.Sig, OpenCsv.SigVerify, OpenCsv.assetId, OpenCsv.commitHash, OpenCsv.nullHash, OpenCsv.ownerKey, Quot.sound
OpenCsv.payload_binds_one_nullifierOpenCsv.bindHash, OpenCsv.bindHash_injective
OpenCsv.receiver_correctnesspropext, OpenCsv.Sig, OpenCsv.SigVerify, OpenCsv.assetId, OpenCsv.bindHash, OpenCsv.commitHash, OpenCsv.nullHash, OpenCsv.ownerKey
OpenCsv.transfer_conservationpropext, OpenCsv.Sig, OpenCsv.SigVerify, OpenCsv.assetId, OpenCsv.commitHash, OpenCsv.nullHash, OpenCsv.ownerKey, Quot.sound
OpenCsv.transfer_lineage_conservationOpenCsv.Sig, OpenCsv.SigVerify, OpenCsv.assetId, OpenCsv.commitHash, OpenCsv.nullHash, OpenCsv.ownerKey
OpenCsv.transfer_lineage_currentOpenCsv.Sig, OpenCsv.SigVerify, OpenCsv.assetId, OpenCsv.commitHash, OpenCsv.nullHash, OpenCsv.ownerKey
OpenCsv.transfer_lineage_edges_matchOpenCsv.Sig, OpenCsv.SigVerify, OpenCsv.assetId, OpenCsv.commitHash, OpenCsv.nullHash, OpenCsv.ownerKey
OpenCsv.transfer_lineage_inputs_nodupOpenCsv.Sig, OpenCsv.SigVerify, OpenCsv.assetId, OpenCsv.commitHash, OpenCsv.nullHash, OpenCsv.ownerKey
OpenCsv.transfer_lineage_nullifiers_nodupOpenCsv.Sig, OpenCsv.SigVerify, OpenCsv.assetId, OpenCsv.commitHash, OpenCsv.nullHash, OpenCsv.ownerKey
OpenCsv.transfer_lineage_predecessors_validOpenCsv.Sig, OpenCsv.SigVerify, OpenCsv.assetId, OpenCsv.commitHash, OpenCsv.nullHash, OpenCsv.ownerKey
OpenCsv.two_input_lineage_distinctpropext, OpenCsv.Sig, OpenCsv.SigVerify, OpenCsv.assetId, OpenCsv.commitHash, OpenCsv.nullHash, OpenCsv.ownerKey
OpenCsv.unknowing_adversary_entry_invisiblepropext, OpenCsv.KnowsRawNf, OpenCsv.bindHash, OpenCsv.occurrence_requires_knowledge
OpenCsv.v4_one_input_lineage_valid_iffpropext, OpenCsv.Sig, OpenCsv.SigVerify, OpenCsv.assetId, OpenCsv.commitHash, OpenCsv.nullHash, OpenCsv.ownerKey
OpenCsv.v4_one_input_slots_distinctOpenCsv.commitHash
OpenCsv.v4_one_input_statement_exactpropext, OpenCsv.commitHash

78 theorems, audited 2026-08-16 from axiom-audit.txt @ 4fa63a3

regenerated 2026-09-15 10:24 UTC · build green · opencsv-formal@4fa63a3

Translated Rust audit — merged reproducibility receipt

A separate audit of the Aeneas-translated opencsv-kernel. These 15 declarations do not inflate the 72 specification-theorem count above. The exact green commit was fast-forwarded without rewriting history and is now the default formal-aeneas branch.

15-declaration translated-Rust refinement ledger
Rust refinement declarationAxiom dependencies
opencsv_kernel.array_eq_decide_specpropext, Classical.choice, Quot.sound
opencsv_kernel.audit_equationpropext, Classical.choice, Quot.sound
opencsv_kernel.binding_eq_specpropext, Classical.choice, Quot.sound, hash.hash_bind
opencsv_kernel.first_occurrence_iff_isFirstOccurrencepropext, Classical.choice, Quot.sound, hash.hash_bind
opencsv_kernel.first_occurrence_none_no_occurrencepropext, Classical.choice, Quot.sound, hash.hash_bind
opencsv_kernel.first_occurrence_specpropext, Classical.choice, Quot.sound, hash.hash_bind
opencsv_kernel.specFirstOccList_bridgepropext, Classical.choice, Quot.sound
opencsv_kernel.specFirstOccList_nonepropext, Classical.choice, Quot.sound
opencsv_kernel.supply_fold_splitpropext, Classical.choice, Quot.sound
opencsv_kernel.supply_loop_specpropext, Classical.choice, Quot.sound, I128.Insts.CoreConvertFromU64.from
opencsv_kernel.supply_specpropext, Classical.choice, Quot.sound, I128.Insts.CoreConvertFromU64.from
opencsv_kernel.truncate24_loop_specpropext, Classical.choice, Quot.sound
opencsv_kernel.truncate24_specpropext, Classical.choice, Quot.sound
opencsv_kernel.well_formed_pure_specpropext, Classical.choice, Quot.sound, hash.hash_bind
opencsv_kernel.well_formed_specpropext, Classical.choice, Quot.sound, hash.hash_bind

15 audited declarations · green hosted run 30765043746 · formal-aeneas@3bcafed

07 / GAPS

Known gaps

These surfaces are outside the machine-checked claim.

08 / RELATED PAGES

Related pages

This page covers only what is proved. Delivery status and throughput are documented on their own receipt-backed pages.