Sequent proves Vyper compiler model as AI verification nears practicality

-
Sequent completed a machine-checked proof of the Vyper compiler model using AI-assisted formal verification and 88,078 mathematical theorems.
-
The research uncovered more than a dozen compiler bugs, highlighting security risks that conventional smart contract audits can miss.
-
The proof does not cover the actual Python compiler implementation, leaving additional verification work before developers can establish complete end-to-end guarantees.
On November 30, Sequent revealed that it had completed a machine-checked proof of the Vyper smart contract compiler.
With a machine-checked proof, a computer checks each step of a mathematical argument for correctness. The approach is central to formal verification, where developers use mathematics to prove that software follows a given set of rules.
In the case of the Vyper project, Sequent used AI to obtain proofs. A theorem prover was used to ascertain if each proof was correct. This approach can help reduce verification costs and get us closer to the day of widespread commercial use of AI-assisted formal verification.
For decentralized finance (DeFi), the benefits could be significant. Compiler flaws have already cost protocols millions of dollars, even when their smart contracts were sound. Formal verification could uncover security flaws that conventional audits might miss.
Proving a compiler already running in the wild
Sequent developed proofs for the compiler of Vyper v0.5.0b1. The company used HOL4, a theorem prover, to check the validity of the mathematical proofs.
Earlier verified compilers, such as CompCert and CakeML, were designed with formal verification in mind. Sequent took a different approach. Instead of developing a new compiler, the company created and verified a mathematical model of the existing Vyper compiler.
Sequent’s verification of the Vyper compiler model spans 2.92 million lines of HOL4 code and 10,102 theories. HOL4 validated 88,078 theorems, with no unproven assumptions reported.
Four of the 88,078 theorems establish end-to-end guarantees for contract deployment, runtime calls, gas sufficiency and sequences of multiple transactions. The guarantees allow developers to verify properties of Vyper source code that also hold, under specified conditions, for EVM bytecode. These are the instructions executed by the Ethereum Virtual Machine.
In order for the guarantees to hold, Sequent also needed to take into account code modifications that could happen during compilation. As part of this work, they had to take into account Vyper’s Venom optimization pipeline that improves code efficiency without changing its intended behavior.
This work also uncovered problems with the compiler itself. Sequent tested the model against 465 compiled test cases and detected over a dozen compiler bugs before they reached production.
The 2023 bug that drained Curve’s pools
Sequent’s work has its roots in a costly DeFi exploit. In 2021, Sequent CEO and Vyper lead developer Charles Cooper inadvertently introduced a compiler flaw. Although developers later fixed the bug, contracts already deployed on the blockchain remained vulnerable.
On July 30, 2023, hackers took advantage of the flaw. The flaw, which is known as a reentrancy-lock bug, turned off a protection to prevent a function of a smart contract from being invoked again prior to the completion of its previous execution.
A LlamaRisk postmortem documented approximately $24.7 million extracted from Curve’s CRV/ETH pool, $22.6 million from Alchemix, $11 million from JPEG’d and $3.4 million from Metronome.
Sequent estimates the total amount extracted at more than $70 million. PeckShield’s initial estimate was around $52 million. Neither figure accounts for the final amount lost after fund recoveries.
The fallout extended to other DeFi markets. According to Coin Metrics, Curve’s total value locked roughly halved to $1.24 billion. The decline also exposed lending markets to liquidation risks.
As Cooper told SiliconANGLE:
“Smart contracts taught us that anything that can be exploited will be.”

Why the cost of a proof is suddenly falling
For formal verification to become a standard security practice, developers need affordable tools. On November 25, Sequent announced $2.2 million in pre-seed funding. Frachtis and Jaan Tallinn’s Metaplanet co-led the round.
Sequent’s AI-powered verification platform, Alan, offers monthly subscriptions starting at $99 for individuals, $200 for auditors and $500 for teams.
Curve, Alan’s first paying customer, has used the platform to establish how much depositors could lose under specified conditions in certain pools.
Curve CEO Michael Egorov said:
“Now, whenever we change a pool’s code, we can prove depositors’ money stays protected by the same limit.”
Other companies are exploring similar applications beyond DeFi. In October, Anthropic reported using Claude to prove security properties across 123 open-source libraries.
Meanwhile, Theorem estimates that verifying 95% of nixpkgs machine code could cost $134 million by late 2027. The estimate depends on further improvements in AI verification capabilities.
Ethereum’s ecosystem is also supporting compiler security through grants. The DAO Security Fund has identified end-to-end Vyper compiler verification as a $600,000 funding target.
What the proof does not cover
Despite Sequent’s achievement, parts of the Vyper compiler remain unverified. The proof applies to a mathematical model rather than the actual Python implementation. It also excludes the parser and type checker.
An October security advisory, CVE-2026-114116, illustrates why these limitations matter. Eight line-separator characters could silently alter numeric values or types in Vyper source code. However, a scan of 45,774 source files found no instances that triggered the flaw.
Developers must also continue checking the security of individual smart contracts. Verifying a compiler model does not establish whether the contracts themselves are secure.
Sequent is working to extend verification to multi-module contracts and Venom’s -O2 optimization pipeline. Beyond Vyper, the company plans to support Solidity and general-purpose programming languages.
If you're reading this, you’re already ahead. Stay there with our newsletter.
FAQs
What did Sequent prove about the Vyper compiler?
Sequent completed a machine-checked HOL4 correctness proof of the Vyper v0.5.0b1 compiler model, establishing that a single-module contract accepted by the verified pipeline runs on the EVM with the behavior the language's formal semantics specify. The actual Python implementation, parser, type checker and individual contracts are not covered.
How much was lost in the 2023 Curve Finance exploit?
Sequent puts the total drained across Curve, Alchemix, JPEG'd and Metronome pools at more than $70 million, traced to a reentrancy-lock flaw in older Vyper versions. Cryptopolitan reported in July 2023 that PeckShield estimated the theft at roughly $52 million.
Why does AI matter for formal verification costs?
Formal verification historically took years of specialist effort, but Anthropic showed in October that Claude could prove properties across 123 open-source libraries, and Theorem estimated verifying 95% of nixpkgs machine code at about $134 million by end-2027, conditional on faster capability gains.
Disclaimer. The information provided is not trading advice. Cryptopolitan.com holds no liability for any investments made based on the information provided on this page. We strongly recommend independent research and/or consultation with a qualified professional before making any investment decisions.

Micah Abiodun
Micah Abiodun makes good use of his Environmental Engineering and Management (MSc) at Tallinn University of Technology (TalTech) to polish content and price prediction news at Cryptopolitan. Now on his 7th year in the crypto media space, he covers major cryptos, altcoins, DeFi, stablecoins, macro trends, and emerging tech.
















