Toolchain verifies Solidity, EVM bytecode

Kontrol

Write properties as Foundry tests in Solidity; Kontrol checks them for all inputs by symbolically running the compiled EVM bytecode on KEVM.

Stage 2 · Production Auto-active Open source · BSD-3-Clause v1.0.255 · 5 months ago
Trust: Checker partial, Semantics strong, Frontend strong, Binary gap strong, Escape hatches partial CheckerSemanticsFrontendBinary gapEscape hatches 3 of 5 strong

Use it if

  • You already test your contracts with Foundry and want those tests to hold for every input, not just random ones.
  • You want the result to be about the compiled EVM bytecode, not just the Solidity source.

Look elsewhere if

  • Your code has loops or inputs whose size is not fixed and you cannot write K invariants and lemmas; you will be limited to bounded checks.
  • You need to reason about calls into unknown, possibly malicious contracts; they have to be mocked.
  • You want fast feedback; the first build alone takes 30 minutes to an hour, and proofs can be slow.

How it works

From your code to an accepted proof. Each step either has to be trusted or is checked by something else.

  1. Input
    Solidity / EVM bytecode code
  2. Front end
    Foundry (forge build) with solc Trusted Compiles the contracts and the Solidity test functions. Kontrol reads the bytecode and metadata from Foundry's build output.
  3. Semantics
    KEVM Validated Tested against the Ethereum conformance suites; see the KEVM page for known gaps.
  4. Translation
    Kontrol (turns each test into a K proof obligation; implements Foundry and Kontrol cheatcodes) Trusted
  5. Checker
    K symbolic execution engine (Haskell backend) Trusted Explores every path through the bytecode. No independently checked proof certificate is documented.
  6. Checker
    Z3 Trusted Answers the SMT queries the K engine sends.
  7. Compiler
    solc (through Foundry) Checked The proof is about the bytecode solc produced, so the compiler is outside the trusted base if you deploy that same build.

Verified or checked: outside the trusted base Validated per run or by tests Trusted without proof

  • Solidity: Through Foundry: properties are Solidity test functions, and the proof is about the bytecode solc produced from your contracts.
  • EVM bytecode: Works on EVM bytecode, including deployed bytecode without source (loaded with the vm.etch cheatcode).

Trust

What a proof from this toolchain relies on: the trusted computing baseTrusted computing base (TCB). Everything that must be correct for a proof to mean what it says., one part at a time. How these are rated.

  1. Checker What has the final word on a proof?
    Partial

    K's symbolic execution engine and Z3 decide; no checked proof certificates.

    source

  2. Semantics Is the tool's model of the language the real language?
    Strong

    KEVM, tested against the Ethereum conformance test suites in CI.

    KEVM does not fully cover Osaka yet (for example the P256VERIFY precompile); see the KEVM page.

    source

  3. Frontend How does your source get into the model?
    Strong

    Uses the bytecode that the real solc compiler produced through Foundry.

  4. Binary gap Does the proof cover what actually runs?
    Strong

    The proof is about EVM bytecode, which is what runs on chain.

    This holds if you deploy the same build (compiler version and settings) that Kontrol checked.

  5. Escape hatches Can a proof silently rest on unchecked assumptions?
    Partial

    Hand-written K lemmas, vm.assume and loop bounds can hide bugs; all sit in project files.

    Lemmas are K rules passed to kontrol build with --require; the docs leave their soundness to the author. Loop invariants are proved as K claims and then added back by hand as rules. --bmc-depth makes a proof bounded.

    source

What it can prove

Kinds of guarantees, not how easy they are to get.

Properties
FeatureSupportNotes
No undefined behavior Memory safety and absence of runtime errors: no out-of-bounds access, use-after-free, overflow traps, panics or undefined behavior on any input allowed by the precondition. SupportedSupported.The EVM has no undefined behavior. A test can require that a call never reverts or hits a failing assertion (such as a checked-arithmetic panic) for every symbolic input.
Source
The EVM has no undefined behavior. A test can require that a call never reverts or hits a failing assertion (such as a checked-arithmetic panic) for every symbolic input. source
Functional correctness The code meets a written specification of its results, for example “returns the sorted list” or “implements this RFC”. SupportedSupported.Specifications are Foundry tests with symbolic inputs, assumptions (vm.assume) and assertions.
Source
Specifications are Foundry tests with symbolic inputs, assumptions (vm.assume) and assertions. source
Equivalence Two programs (an optimized and a reference version, or code before and after a change) are proved to behave the same, or one refines the other. PartialPartial.No dedicated mode. You write a test that calls two implementations with the same symbolic inputs and compares the results; the kontrol-solady repository calls this "function equivalence".
Source
No dedicated mode. You write a test that calls two implementations with the same symbolic inputs and compares the results; the kontrol-solady repository calls this "function equivalence". source
Information flow Secrets do not influence public outputs, timing or memory access patterns (constant-time code, non-interference). Not applicableNot applicable.Contract code, storage and inputs are public on chain, so secrecy properties do not apply. Contract code, storage and inputs are public on chain, so secrecy properties do not apply.
Concurrency Correctness of code with threads or shared memory: absence of data races, deadlock freedom, linearizability of concurrent data structures. Not applicableNot applicable.EVM execution is sequential. Reentrancy is covered under external calls. EVM execution is sequential. Reentrancy is covered under external calls.
Termination and liveness Every run finishes, or the system keeps making progress (liveness). PartialPartial.No termination or general liveness proofs (on chain every run ends when gas runs out). A test can show that a specific call does not revert under stated conditions. No termination or general liveness proofs (on chain every run ends when gas runs out). A test can show that a specific call does not revert under stated conditions.

Language coverage

Which parts of Solidity and EVM bytecode it handles. Hover or focus a mark for details.

Common features

Common features
FeatureSupportNotes
Machine integers Fixed-width integer arithmetic, overflow and bit operations. SupportedSupported.256-bit EVM words and their arithmetic are modeled exactly by KEVM.
Source
256-bit EVM words and their arithmetic are modeled exactly by KEVM. source
Floating point IEEE 754 floating-point arithmetic, including rounding and NaNs. Not applicableNot applicable.Solidity has no floating point; fixed-point types can be declared but not assigned.
Source
Solidity has no floating point; fixed-point types can be declared but not assigned. source
Heap and pointers Dynamically allocated memory, pointers or references, and aliasing. PartialPartial.EVM memory is modeled byte by byte, but data whose size is symbolic is not supported; tests must choose concrete sizes.
Source
EVM memory is modeled byte by byte, but data whose size is symbolic is not supported; tests must choose concrete sizes. source
Arrays and buffers Indexed memory such as arrays, slices, vectors and byte buffers. PartialPartial.Dynamic arrays and bytes need concrete lengths chosen in the test; the docs say symbolic lengths are not supported.
Source
Dynamic arrays and bytes need concrete lengths chosen in the test; the docs say symbolic lengths are not supported. source
Loops Unbounded loops, which need invariants or bounds to verify. PartialPartial.Loops are unrolled up to a bound (--bmc-depth), or need an invariant written by hand as a K claim over the bytecode, proved, and then added as a rule.
Source
Loops are unrolled up to a bound (--bmc-depth), or need an invariant written by hand as a K claim over the bytecode, proved, and then added as a rule. source
Recursion Functions that call themselves, directly or through others. UnknownUnknown.Not documented. Not documented.
Higher-order code Function pointers, closures and callbacks. UnknownUnknown.Calls through Solidity function-type values are not documented. Calls through Solidity function-type values are not documented.
Threads and shared memory Concurrent threads with locks, atomics or message passing. Not applicableNot applicable.The EVM has no threads. The EVM has no threads.
I/O and system calls Files, network, system calls and foreign-function calls. Not applicableNot applicable.Contracts have no file or network I/O. Foundry's file, environment and FFI cheatcodes are listed as not yet implemented in Kontrol.
Source
Contracts have no file or network I/O. Foundry's file, environment and FFI cheatcodes are listed as not yet implemented in Kontrol. source
Standard library Specifications or models for the language's standard library. PartialPartial.keccak256 results stay symbolic; Kontrol ships a set of keccak lemmas to reason about them. Library code such as OpenZeppelin is checked as ordinary bytecode.
Source
keccak256 results stay symbolic; Kontrol ships a set of keccak lemmas to reason about them. Library code such as OpenZeppelin is checked as ordinary bytecode. source

EVM-specific features

EVM-specific features
FeatureSupportNotes
Gas Gas accounting and out-of-gas behavior. PartialPartial.Gas is not computed by default; the --use-gas flag turns on KEVM's gas model.
Source
Gas is not computed by default; the --use-gas flag turns on KEVM's gas model. source
Storage Persistent contract storage. SupportedSupported.Storage can be made fully symbolic with the symbolicStorage cheatcode.
Source
Storage can be made fully symbolic with the symbolicStorage cheatcode. source
External calls Calls to other contracts, including reentrancy. PartialPartial.Calls into contracts deployed in the test run on KEVM, so reentrancy through known code is covered. We found no documented way to model arbitrary unknown callee code; the docs suggest mocking external calls (mockCall).
Source
Calls into contracts deployed in the test run on KEVM, so reentrancy through known code is covered. We found no documented way to model arbitrary unknown callee code; the docs suggest mocking external calls (mockCall). source
Precompiles Built-in contracts such as hashing and elliptic-curve operations. PartialPartial.KEVM computes precompiles only on concrete inputs, and Osaka's P256VERIFY precompile is missing.
Source
KEVM computes precompiles only on concrete inputs, and Osaka's P256VERIFY precompile is missing. source

Stage

Computed from the evidence below; see the criteria.

Stage 0 Research Met
  • Met: Publicly available evidence
  • Met: At least one published verification uses it Runtime Verification's verification of Optimism's pausability mechanism (May 2024). evidence
Stage 1 Usable Met
  • Met: Released or updated in the last 12 months Latest release: v1.0.255, 2026-06-24. Latest commit: 2026-10-15. evidence
  • Met: Installs and runs on current platforms Installed with Runtime Verification's kup package manager, or built from source. evidence
  • Met: User documentation or tutorial evidence
  • Met: Used by a group other than its authors Optimism keeps Kontrol proofs in its own repository and runs them in CI (commits as recent as November 2026). evidence
Stage 2 Production Met
  • Met: Verified code in production at two or more independent organizations 2 recorded: Optimism, Lido.
  • Met: Checker axis is not red
  • Met: Semantics axis is not red
  • Met: Public channel for soundness bugs Public GitHub issue tracker. evidence

In use

Verified code in production, and notable verification projects.

In production

  • Optimism Pausability mechanism of the L1 contracts, verified as deployed (initial state taken from the deployment sequence). source
  • Lido Dual Governance contracts, verified by Runtime Verification with Kontrol (report of February 2025); live on mainnet since July 2025. source

Facts and sources

Effort
Auto-active: You write specifications and hints; a solver does the proving.
Licence
Open source, BSD-3-Clause
Maintained by
Runtime Verification
Latest release
v1.0.255 (24 Jun 2026) source
Last checked
26 Nov 2026

Further sources

esc