Sequent Completes AI-Assisted Machine-Checked Proof of the Vyper Compiler Model
Key Takeaways
- •Sequent produced a machine-checked proof of the Vyper v0.5.0b1 compiler by having AI generate mathematical proofs that the HOL4 theorem prover independently validated, covering 88,078 theorems with no unproven assumptions reported.
- •Unlike earlier verified compilers such as CompCert and CakeML that were built for verification from the start, Sequent verified a mathematical model of an existing production compiler, establishing end-to-end guarantees for deployment, runtime calls, gas sufficiency, and multi-transaction sequences.
- •The project was motivated by the July 30, 2023 Vyper reentrancy-lock compiler bug, which allowed hackers to extract an estimated $52 million to $70 million from DeFi protocols including Curve, Alchemix, JPEG'd, and Metronome even though their contracts were correctly written.
- •Sequent raised $2.2 million in pre-seed funding co-led by Frachtis and Metaplanet and offers its AI-powered Alan verification platform through monthly subscriptions starting at $99 for individuals, with Curve as its first paying customer.
- •The proof applies to a mathematical model rather than the actual Python implementation and excludes the parser and type checker, meaning developers must still independently assess the security of individual smart contracts.

On November 30, formal verification startup Sequent announced that it had completed a machine-checked proof of the Vyper smart contract compiler, the software that translates Vyper source code into executable bytecode for the Ethereum Virtual Machine (EVM). Vyper is a Python-like language for writing Ethereum smart contracts. A machine-checked proof is one in which a computer verifies each step of a mathematical argument for correctness. The technique is central to formal verification, the practice of using mathematics to prove that software follows a defined set of rules. In this case, Sequent used AI to obtain the proofs, while a theorem prover checked that each proof was correct.
The company said the approach can reduce verification costs and move the industry closer to 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, and formal verification can uncover security defects that conventional audits might miss.
Verifying a compiler already running in the wild
Sequent developed proofs for the compiler of Vyper v0.5.0b1, using HOL4, a theorem prover, to check the validity of the mathematical arguments. Earlier verified compilers, such as CompCert for the C programming language and CakeML for the ML family, were designed with formal verification in mind. Sequent took a different approach: instead of building a new compiler from scratch, it created and verified a mathematical model of the existing Vyper compiler — software already running in production.
The verification spans 2.92 million lines of HOL4 code and 10,102 theories. HOL4 validated 88,078 theorems, with no unproven assumptions reported. Four of those 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, the low-level instructions executed by the Ethereum Virtual Machine.
For the guarantees to hold, Sequent also had to account for code modifications that occur during compilation, including Vyper's Venom optimization pipeline, which improves code efficiency without changing its intended behavior.
The work also uncovered problems with the compiler itself. Sequent tested the model against 465 compiled test cases and detected more than a dozen compiler bugs before they reached production.
The 2023 bug that drained Curve's pools
Sequent's effort 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 — where code cannot be directly patched — remained vulnerable.
On July 30, 2023, hackers took advantage of the flaw, known as a reentrancy-lock bug, which disabled the protection that prevents a smart contract function from being invoked again before its previous execution completes. Because the flaw sat in the compiler rather than in the affected protocols' contract code, even correctly written contracts were exposed. A postmortem by LlamaRisk 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, while 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 — the funds deposited in its contracts — roughly halved to $1.24 billion, and the decline exposed lending markets to liquidation risks, where loans backed by declining collateral can be forcibly closed.
As Cooper told SiliconANGLE: “Smart contracts taught us that anything that can be exploited will be.”
Why the cost of a proof is 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, co-led by Frachtis and Metaplanet, the firm co-founded by Jaan Tallinn.
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, the open-source Nix package collection, could cost $134 million by late 2027, an estimate that 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 the achievement, parts of the Vyper compiler remain unverified. The proof applies to a mathematical model rather than the actual Python implementation, and it excludes the parser and type checker.
Those limitations matter in practice. An October security advisory, CVE-2026-114116, described how 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, because 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.