CoinSleuth

For AI-Generated Vault Code, Review the Rules Before the Code

If you rely on a smart-contract vault to hold assets, a useful security question is whether its code satisfies the rules it is supposed to follow—not just whether the code looks plausible.

An article published on November 17, 2026, argues that AI-generated code can make conventional code review a bottleneck. It proposes shifting some human attention to specification review: write the properties a change must satisfy in plain English, have people review those properties, then use formal-verification tools to check the code against them. This is a proposed workflow, not a guarantee that a contract is safe.

The article describes a demonstration by Certora CEO Mooly Sagiv involving an ERC-4626 USDC vault. An agent inferred properties and generated Solidity code and CVL rules. A prover then found an approximately 5-wei dilution vulnerability caused by high-water-mark rounding; the issue was subsequently fixed in the demonstration. The account describes a discovered vulnerability, not a confirmed loss of funds.

The difficult question remains whether the specification itself captures the right behavior. For teams reviewing AI-generated contract changes, the article’s practical starting point is to review the intended properties before relying on a prover’s result.

Further reading