← All papers
First page of Foundational Refinement Proofs for Deployed Bytecode, at the Price of Tokens

Foundational Refinement Proofs for Deployed Bytecode, at the Price of Tokens

Lefteris Lazaropoulos, Zoe Paraskevopoulou

cs.PL Jul 28, 2026 · v1
EquiVM, a Lean 4 framework with executable EVM semantics and Sol- specification language, states and proves refinement of deployed bytecode via LLM agents.
Relating low-level executable code to a high-level account of its behavior has been a central concern of programming-language research for decades. From formally verified compilers to translation validators, certifying compilers, and proof-carrying code, each approach chooses between laborious but foundational mechanized proofs and automation that costs completeness, generality, and an increased trusted base. Recently, large language models (LLMs) have begun to change the economics of formal verification. Agentic proof development is now capable of producing machine-checked proofs at a scale and speed that were previously out of reach. In this paper, we evaluate the capabilities of LLMs to produce foundational, machine-checked proofs of refinement between executable code and its high-level specification, as post hoc, per-artifact certificates. We study this in the context of the Ethereum Virtual Machine (EVM), a low-level virtual machine that executes smart contracts on the Ethereum blockchain. We build EquiVM, a foundational framework in Lean comprising an executable EVM semantics and a specification language that characterizes the intended behavior of smart contracts, but commits to no source language or compilation toolchain. In EquiVM, refinement is stated for deployed bytecode of arbitrary provenance, interaction with unknown code is part of the semantics, and each proof is a replayable, machine-checked certificate. No previous technique achieves this combination. Using frontier commercial LLMs, twenty-three real-world contracts are proved end to end with minimal human guidance, among them most of the MakerDAO stablecoin system, at up to a hundred million tokens and a hundred hours of proof time per contract. We conclude that foundational mechanized proofs can now be bought at the price of tokens, and that this shift can reshape how verification frameworks are architected.

Relating low-level executable code to its high-level intended behavior traditionally requires either laborious foundational proofs tied to a specific compiler or automation that sacrifices completeness and enlarges the trusted base. For deployed EVM smart contracts of arbitrary provenance, no prior technique provides foundational, per-artifact refinement certificates.

EquiVM is a foundational framework built in Lean, extending Nethermind's EVMYulLean executable EVM semantics and adding Sol-, a Solidity-like specification language that commits to no source language or compiler. Refinement is stated as one theorem per contract relating deployed creation/runtime bytecode to a Sol- specification under a configuration, quantifying over all execution contexts including interaction with unknown code. Frontier commercial LLM agents produce the machine-checked Lean proofs as replayable certificates.

Twenty-three real-world deployed contracts (twenty-seven total including exploratory examples) spanning three compiler generations were proved end to end with minimal human guidance, including most of the MakerDAO stablecoin system, at up to a hundred million tokens and a hundred hours of proof time per contract, with up to seventy-six thousand lines of proof.