OpenVM is end-to-end formally verified
Machine-checked theorems in Lean 4 covering all of OpenVM, from soundness of the SWIRL proof system to the recursion and RISC-V circuits.
Formally verified in Lean 4
How the formal verification fits together
SWIRL
Straightline round-by-round knowledge soundness for SWIRL.
Read →Fiat-Shamir
Applying the BCS transform to get a non-interactive proof system.
Read →VM Circuits
Circuit correctness for every extension, including RISC-V.
Read →Recursion & Aggregation
Combining SWIRL proofs with a recursive verifier.
Read →Certified OpenVM Verifier
Compiling the Lean verifier into an executable binary.
Read →E2E Composition
Putting everything together for OpenVM as a whole.
Read →SWIRL
Straightline round-by-round knowledge soundness for SWIRL.
Read →Fiat-Shamir
Applying the BCS transform to get a non-interactive proof system.
Read →Builds on: SWIRLVM Circuits
Circuit correctness for every extension, including RISC-V.
Read →Recursion & Aggregation
Combining SWIRL proofs with a recursive verifier.
Read →Builds on: Fiat-ShamirCertified OpenVM Verifier
Compiling the Lean verifier into an executable binary.
Read →Builds on: Fiat-ShamirE2E Composition
Putting everything together for OpenVM as a whole.
Read →Builds on: VM Circuits · Recursion & Aggregation · Certified OpenVM Verifier| Component | Statement lines | Proof lines | Theorems |
|---|---|---|---|
| SWIRL | 103,167 | 199,660 | 6,426 |
| Fiat-Shamir | 30,481 | 490,217 | 9,783 |
| VM Circuits | 7,843 | 495,231 | 24,365 |
| Recursion & Aggregation | 9,777 | 853,257 | 22,544 |
| Certified OpenVM Verifier | 176 | 248 | 0 |
| End-to-End Composition | 1,247 | 28,160 | 997 |
| Total | 152,691 | 2,066,773 | 64,115 |
- Statement lines
- 152,691
- Proof lines
- 2,066,773
- Theorems
- 64,115
Machine-checked proofs
Our proofs are verified by the Lean kernel, a minimal type checker with multiple independent implementations, ensuring logical correctness.
We audit the proofs with the gold standard Lean comparator, confirming that every theorem is stated using a small trusted core of definitions and that its proof relies only on Lean's standard axioms. This rules out statement tampering or usage of hidden assumptions.
Visit each proof blueprint page to check correctness of the statements.
Integrated into OpenVM
The certified Lean verifier is compiled to a C binary and integrated into OpenVM 2.1.0, meaning the ZK proof verifier now has formal correctness guarantees. Read about the compilation process.
$ cargo openvm verify stark --certified