# Solidity SMTChecker

> Turn on a Solidity compiler option and it tries to prove your assert statements and the absence of overflow, division by zero and out-of-bounds access.

- Kind: toolchain
- Verifies: Solidity (Works on Solidity source inside the compiler. Enabled by choosing an engine (--model-checker-engine); the default is no engine.)
- Effort: Push-button — Run it on your code; little or no annotation.
- Stage: 1 (Usable)
- Trust: Checker partial, Semantics partial, Frontend strong, Binary gap weak, Escape hatches partial
- Licence: open-source, GPL-3.0
- Latest release: v0.8.39 (2026-11-19) https://github.com/argotorg/solidity/releases/tag/v0.8.39
- Links: [homepage](https://soliditylang.org/), [repo](https://github.com/argotorg/solidity), [docs](https://docs.soliditylang.org/en/latest/smtchecker.html), [paper](https://link.springer.com/chapter/10.1007/978-3-031-13185-1_16)

## Use it if
- You want a free, push-button check built into the Solidity compiler you already use.
- Your properties fit in assert statements, with require statements as assumptions.
- You want counterexamples, or inferred contract invariants, reported as compiler warnings.

## Look elsewhere if
- You need a separate specification language, ghost state or quantifiers; properties are plain assert statements.
- Your contract relies on inline assembly, hashing or ABI encoding; these are abstracted, which often causes false alarms.
- You need the guarantee to cover the deployed bytecode; the check is on the source and solc's code generator is trusted.

## How it works (pipeline)

| Step | Component | Assurance | Note |
|---|---|---|---|
| frontend | solc parser and type checker | trusted | The SMTChecker runs inside the compiler on the same parsed and type-checked code that solc compiles. |
| semantics | SMTChecker's model of Solidity | trusted | Built into the compiler; tested by the compiler's own SMTChecker test suite. |
| translation | CHC engine (Horn clauses covering any number of transactions); BMC engine (deprecated) | trusted |  |
| checker | Z3 (with its Spacer Horn solver) (`z3`) | trusted | Default. Built into the JavaScript build of solc (soljson.js); native builds use a z3 installed on the system. |
| checker | Eldarica | trusted | Alternative Horn solver for the CHC engine, used only if z3 is not enabled. |
| checker | cvc5 (`cvc5`) | trusted | Used only by the deprecated BMC engine. |
| compiler | solc code generator and optimizer | trusted | Produces the bytecode after the check; not verified. |

## Trust

| Axis | Level | Summary | Note |
|---|---|---|---|
| Checker | Partial (amber) | Z3's Horn solver (or Eldarica) decides; no proof certificates. | The SMTChecker's own encoding is also trusted. An open issue (#17193, November 2026) reports an unsound gasleft() assumption for the Amsterdam target. [source](https://github.com/argotorg/solidity/issues/17193) |
| Semantics | Partial (amber) | Solidity model built into the compiler; tested by its own test suite. |  [source](https://github.com/argotorg/solidity/tree/develop/test/libsolidity/smtCheckerTests) |
| Frontend | Strong (green) | Runs inside solc on the compiler's own parsed and type-checked code. |  |
| Binary gap | Weak (red) | The check is on the source; solc's code generator and optimizer are not verified. |  |
| Escape hatches | Partial (amber) | Trusted-call mode and target filters are compiler options and easy to find. | Trusted external calls (--model-checker-ext-calls=trusted) can be unsound if their assumptions are inconsistent, and targets can be switched off. Properties the solver cannot settle are still reported as warnings ("might happen"), not silently passed. [source](https://docs.soliditylang.org/en/latest/smtchecker.html) |

## What it can prove

| Property | Support |
|---|---|
| No undefined behavior | Supported — Checks assertions, overflow and underflow, division by zero, out-of-bounds index access, popping an empty array and insufficient balance for transfer. Overflow and underflow are off by default for Solidity 0.8.7 and later, because checked arithmetic already reverts. ([source](https://docs.soliditylang.org/en/latest/smtchecker.html)) |
| Functional correctness | Partial — Properties are assert statements inside the contract; there is no separate specification language. ([source](https://docs.soliditylang.org/en/latest/smtchecker.html)) |
| Equivalence | Partial — No dedicated support. You can call two versions from one contract and assert that their results are equal. |
| Information flow | Not applicable — Contract code, storage and inputs are public on chain, so secrecy properties do not apply. |
| Concurrency | Not applicable — EVM execution is sequential. Reentrancy is covered under external calls. |
| Termination and liveness | Not supported — There are no checks for termination or liveness among the verification targets. ([source](https://docs.soliditylang.org/en/latest/smtchecker.html)) |

## Common features

| Feature | Support |
|---|---|
| Machine integers | Supported — Integers become mathematical integers with range checks. Bitwise operations need bit-vector reasoning, which solvers find hard: the SolCMC paper rewrote one '&' as '%' so that a proof of the Ethereum deposit contract went through. ([source](https://docs.soliditylang.org/en/latest/smtchecker.html)) |
| Floating point | Not applicable — Solidity has no floating point; fixed-point types can be declared but not assigned. ([source](https://docs.soliditylang.org/en/latest/types.html#fixed-point-numbers)) |
| Heap and pointers | Unknown — How memory and storage references that point to the same data are handled is not described in the docs. |
| Arrays and buffers | Supported — Arrays, mappings, bytes and strings are SMT arrays with a length; push and pop are modeled precisely and out-of-bounds access is checked. ([source](https://docs.soliditylang.org/en/latest/smtchecker.html)) |
| Loops | Supported — The CHC engine handles loops by finding invariants automatically. If the solver gives up, the warning says the failure "might happen". The deprecated BMC engine ignores loops. ([source](https://docs.soliditylang.org/en/latest/smtchecker.html)) |
| Recursion | Unknown — CHC uses function summaries for internal calls; the docs do not say how recursion is handled. BMC does not inline recursive calls. ([source](https://docs.soliditylang.org/en/latest/smtchecker.html)) |
| Higher-order code | Unknown — Function types are not in the docs' list of supported types. Unsupported constructs are over-approximated (sound, but may give false alarms). ([source](https://docs.soliditylang.org/en/latest/smtchecker.html)) |
| Threads and shared memory | Not applicable — The EVM has no threads. |
| I/O and system calls | Not applicable — Contracts have no file or network I/O. |
| Standard library | Partial — keccak256, ecrecover, ripemd160, blockhash and the ABI encoding functions are uninterpreted functions, so their actual results are unknown to the checker. ([source](https://docs.soliditylang.org/en/latest/smtchecker.html)) |

## EVM-specific features

| Feature | Support |
|---|---|
| Gas | Not supported — Gas is not modeled; gasleft() is abstracted. ([source](https://docs.soliditylang.org/en/latest/smtchecker.html)) |
| Storage | Supported — State variables and mappings are tracked across any number of transactions (CHC engine). ([source](https://docs.soliditylang.org/en/latest/smtchecker.html)) |
| External calls | Supported — External calls are treated as unknown code that can do anything, including calling back into the contract. A trusted mode uses the known callee code instead; the docs warn it can be unsound if its assumptions are inconsistent. ([source](https://docs.soliditylang.org/en/latest/smtchecker.html)) |
| Precompiles | Partial — ecrecover and ripemd160 are uninterpreted functions; precompile results are not computed. ([source](https://docs.soliditylang.org/en/latest/smtchecker.html)) |

## Stage

**Stage 1: Usable.**

| Stage | Criterion | Met | Evidence / note |
|---|---|---|---|
| 0 | Publicly available | yes | [evidence](https://github.com/argotorg/solidity) |
| 0 | At least one published verification uses it | yes | [evidence](https://link.springer.com/chapter/10.1007/978-3-031-13185-1_16) Alt et al., SolCMC (CAV 2022): case studies on the Ethereum deposit contract and OpenZeppelin's ERC777. |
| 1 | Released or updated in the last 12 months | yes | [evidence](https://github.com/argotorg/solidity/releases/tag/v0.8.39) Latest release: v0.8.39, 2026-11-19. |
| 1 | Installs and runs on current platforms | yes | [evidence](https://github.com/argotorg/solidity/releases/tag/v0.8.39) Ships with every solc release; native builds need z3 (or Eldarica/cvc5) installed. |
| 1 | User documentation or tutorial | yes | [evidence](https://docs.soliditylang.org/en/latest/smtchecker.html) |
| 1 | Used by a group other than its authors | yes | [evidence](https://arxiv.org/abs/2402.10750) Independent researchers (Bartoletti et al., 2024) compared SolCMC with the Certora Prover in a benchmark study. |
| 2 | Verified code in production at two or more independent organizations | no | None recorded. |
| 2 | Checker axis is not red | yes |  |
| 2 | Semantics axis is not red | yes |  |
| 2 | Public channel for soundness bugs | yes | [evidence](https://github.com/argotorg/solidity/labels/smt) Public GitHub issues with an 'smt' label, including soundness reports such as #17193. |

Missing for Stage 2: Verified code in production at two or more independent organizations.

## Projects
- [Ethereum beacon chain deposit contract: an assertion proved safe after a small rewrite (SolCMC paper)](https://verify.inf.usi.ch/sites/default/files/solcmc.pdf)
- [OpenZeppelin ERC777: found that total supply can change during a transfer through reentrant hooks (SolCMC paper)](https://verify.inf.usi.ch/sites/default/files/solcmc.pdf)

## Sources
- [SMTChecker and Formal Verification (Solidity docs)](https://docs.soliditylang.org/en/latest/smtchecker.html)
- [SMTChecker docs source (develop branch; BMC deprecation note)](https://github.com/argotorg/solidity/blob/develop/docs/smtchecker.rst)
- [Alt, Blicha, Hyvärinen, Sharygina, SolCMC: Solidity Compiler's Model Checker (CAV 2022), author copy](https://verify.inf.usi.ch/sites/default/files/solcmc.pdf)
- [Bartoletti et al., Towards benchmarking of Solidity verification tools (2024)](https://arxiv.org/abs/2402.10750)
- [Solidity releases](https://github.com/argotorg/solidity/releases)
- [Solidity README (maintained by the Argot Collective)](https://github.com/argotorg/solidity/blob/develop/README.md)

---
Last checked 2026-11-26. Data: [JSON](/toolchains/solc-smtchecker.json) · Page: [HTML](/toolchains/solc-smtchecker/) · Methodology v0.1: [/methodology/](/methodology/) · Corrections: [/contribute/](/contribute/)
