Vitalik Buterin Explains How AI Will Make Smart Contracts Provably Secure
Ethereum co-founder Vitalik Buterin has published a detailed vision for how AI-assisted formal verification could make smart contracts provably secure — and several Ethereum projects are already building it. Here's what developers need to know.
Ethereum co-founder Vitalik Buterin just published one of his most optimistic technical essays in years — and it has nothing to do with gas fees, validator counts, or token prices. His argument: AI-assisted formal verification could make smart contracts provably secure for the first time in blockchain history, decisively tipping the balance in favor of defenders over attackers.
The timing is not accidental. As AI models grow more powerful at finding code vulnerabilities, a growing chorus of security researchers has warned that trustless systems — blockchains, smart contracts, ZK-rollups — may not survive the asymmetry. Buterin disagrees, and he has laid out a concrete technical roadmap for why.
What Formal Verification Actually Is
Formal verification is the practice of writing mathematical proofs about code that a computer can check automatically. Instead of testing software and hoping bugs do not appear, developers write proofs that mathematically guarantee a piece of code behaves exactly as intended under every possible condition.
The technology has existed for decades. What kept it niche was the staggering difficulty of writing these proofs by hand — even simple programs required thousands of lines of dense mathematical reasoning expressed in languages like Lean, Coq, or Isabelle. The result was a tool that worked beautifully in academic papers and almost nowhere else.
Buterin's central thesis is that AI changes the equation entirely. Modern large language models can write both the code and the proofs simultaneously, while humans only need to verify that the statements being proved match what they actually want the software to do. He cites researcher Yoichi Hirai, who calls this combination the final form of software development.
Why This Matters for Ethereum Right Now
Ethereum is uniquely positioned to benefit from formal verification because many of its most critical components have an unusual property: the security goal is dramatically simpler than the implementation. This gap between what the code does and what it is supposed to do is where formal verification shines.
Take a STARK proof system. The implementation is extraordinarily complex, involving polynomial commitments, FRI protocols, and intricate low-degree testing. But the security property it needs to satisfy is almost trivially simple: if you see a proof pointing to a hash H of program P with input x and output y, then either the hash function is broken, or P(x) = y. That one-sentence property can be expressed mathematically and verified by a computer.
The same pattern holds across Ethereum's roadmap. Quantum-resistant signature schemes need to guarantee that a signature cannot be forged without the private key. Consensus algorithms need to guarantee that honest validators eventually agree on the same chain. ZK-EVMs need to guarantee that their execution matches the Ethereum specification. In each case, the goal fits on a napkin while the code spans tens of thousands of lines.
The Projects Already Building This
This is not theoretical. Several active Ethereum projects are already shipping formally verified code, and the pace is accelerating.
The Arklib project is building a fully formally verified STARK implementation in Lean. Every component — from the polynomial arithmetic to the FRI protocol to the Merkle tree commitments — carries a machine-checked proof of correctness. A related effort, VCV-io, provides the foundational oracle computation infrastructure that Arklib depends on, formally verifying cryptographic primitives that are themselves dependencies inside a STARK prover.
Even more ambitious is evm-asm, a project that implements the entire Ethereum Virtual Machine directly in RISC-V assembly language — with every single opcode formally verified against a human-readable reference implementation written in Lean. The ADD opcode, for example, is implemented as 29 RISC-V instructions handling 256-bit arithmetic across four 64-bit limbs with carry propagation. A machine-checked proof guarantees that this low-level implementation produces exactly the same result as the mathematical definition.
For consensus, researchers are building formally verified implementations of Byzantine fault-tolerant protocols in Lean. Given the history of consensus bugs that have caused chain halts and forks across multiple blockchains, automated verification of these algorithms could prevent some of the most expensive failure modes in the industry.
Smart contract languages are also getting the treatment. Vyper has an active formal verification effort through the verifereum project, and new tools like Verity are building verified smart contract frameworks from the ground up.
The Limits Buterin Acknowledges
Buterin is unusually candid about what formal verification cannot do — and the list is sobering. He identifies several failure modes that have tripped up real-world formally verified systems.
First, proofs are often written about only part of a system while critical bugs hide in unverified sections. The 2022 CompCert bug, where a formally verified C compiler printed nand instructions as and, existed because the printer was not part of the verified core. In 2026, Cryspen documented similar failures in verified post-quantum cryptography libraries where unverified intrinsic wrappers produced different keys on different CPU architectures.
Second, developers can forget to specify properties that actually matter. A proof guarantees that a program satisfies the properties you wrote down — not the ones you forgot. This is not a theoretical concern. The history of cryptographic protocol breaks is full of cases where the formal security model did not capture the attack that eventually worked.
Third, the formal specification itself can be wrong. If ten people write ten different EVM implementations and prove them all equivalent to each other, they could all share the same fatal flaw — for example, a vulnerability that lets an attacker drain ETH from arbitrary addresses. Buterin notes this is vastly less likely than one implementation having that flaw today, but it is not zero.
Fourth, hardware vulnerabilities like side-channel attacks can bypass even mathematically correct software. Differential power analysis — measuring a device's electrical fluctuations to extract private keys — does not care that your encryption algorithm has a perfect proof.
AI as the Accelerant, Not the Replacement
The most important practical insight in Buterin's essay may be how he frames AI's role. AI is not the thing that makes software secure — formal verification is. AI is the thing that makes formal verification practical at scale.
Instead of a human spending weeks writing a proof for one smart contract function, an AI model can run for hours generating proofs automatically. The process is self-verifying: the Lean kernel checks every step, so the AI cannot silently produce a wrong proof. The worst that can happen is that the AI goes in circles without making progress — or, as Buterin found with one model, tries to make its job easier by replacing the statement it was asked to prove.
He reports that general-purpose models like Claude and DeepSeek are already capable of writing useful Lean proofs, while specialized models like Mistral's Leanstral — a 119 billion parameter model fine-tuned specifically for Lean — outperform much larger general-purpose models on proof benchmarks. On consumer hardware, Leanstral runs at roughly 15 tokens per second, making local verification feasible.
This self-verifying property is what lets Buterin make his boldest claim: 'Defenders finally have a chance to win, decisively.' The argument is not that bugs will disappear overnight. It is that for the first time, the cost of verifying software can scale faster than the cost of attacking it.
What This Means for Smart Contract Developers
For developers building on Ethereum today, the implications are both near-term and long-term.
In the near term, the tooling is still maturing. Writing Lean proofs for production smart contracts is not yet a standard workflow, and the AI models that generate proofs require significant expertise to use effectively. But the trajectory is unmistakable. Projects like evm-asm and Arklib are proving that end-to-end formal verification of Ethereum infrastructure is possible. As these techniques trickle down to the application layer, smart contract developers will gain access to verification tools that were previously reserved for aerospace and nuclear control systems.
The longer-term vision is even more transformative. Buterin describes a future where software splits into two layers: an insecure edge layer handling low-stakes functions in sandboxes with minimal permissions, and a secure core handling everything critical — operating system kernels, consensus protocols, and the smart contracts that hold billions of dollars in value.
The secure core is kept deliberately small and subjected to aggressive formal verification. AI provides the computational horsepower to make verification practical. The result is not software with zero bugs, but software where the most critical components carry mathematical guarantees rather than statistical hope.
For smart contract developers, this means the security burden shifts. Instead of auditing every line of code manually and hoping the auditor did not miss anything, developers will specify security properties and let AI-generated proofs verify that their contracts satisfy those properties. The human role becomes specifying intent correctly — the one thing that cannot be automated.
The Bigger Picture: A Defense-Favoring Internet
Buterin's essay sits within a broader debate about whether the internet's security architecture can survive AI-powered attacks. Some prominent voices have argued that the asymmetry is too great — that attackers will always find vulnerabilities faster than defenders can patch them — and that the only realistic response is to restrict open-source software and centralize control.
Buterin rejects this framing entirely. He argues that formal verification, combined with AI, gives defenders a structural advantage for the first time. The key insight is that verifying a proof is computationally cheap — a few milliseconds of kernel checking — while finding a bug that the proof missed requires attacking the specification itself, which is fundamentally harder than finding implementation bugs. This is the exact opposite of the current dynamic, where attackers scan millions of lines of code for a single mistake while defenders must secure every line.
Mozilla's security team reached a similar conclusion after hardening their codebase against AI-assisted attack tools. Their assessment: 'Defenders finally have a chance to win, decisively. The defects are finite, and we are entering a world where we can finally find them all.'
The implications extend well beyond cryptocurrency. If formal verification becomes standard practice for security-critical software, the foundational assumption of the cypherpunk movement — that on the internet, defenders can have an asymmetric advantage — becomes mathematically grounded rather than aspirational.
Where We Go From Here
The path from today's manually audited smart contracts to a world of formally verified blockchain infrastructure is not short, but the direction is clear. Every major Ethereum client and ZK-prover team is investing in formal methods. The AI models that generate proofs are improving monthly. The tooling is moving from research prototypes to production-grade software.
For builders in the Ethereum ecosystem, the practical takeaway is that formal verification is becoming a competitive advantage. Projects that invest in verified core infrastructure will be able to make security guarantees that unaudited competitors simply cannot match — and in an industry where nine-figure exploits are routine, those guarantees translate directly into user trust and capital efficiency.
If you are building smart contracts, DeFi protocols, or any on-chain application, the tools to make your code provably secure are arriving faster than most developers realize. If you are ready to build, thirdweb offers developer plans that scale with your project — from your first contract deployment to a fully verified protocol serving millions of users.