Wallet custody, cryptographic trust boundaries, vulnerabilities, audits and practical defensive habits

Reviewing AI-Written Vault Code Starts With the Specification

For anyone relying on a vault to hold assets, the question is not only whether its code looks sound, but whether anyone has clearly stated what the code must guarantee. An article published on November 17, 2026, argues that as AI generates more code, reviewing that code becomes a bottleneck. It proposes shifting human attention toward specification review: write the required properties in plain English, have people review them, then use formal verification tools to check the implementation against them.

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. The prover identified a dilution flaw of approximately 5 wei caused by high-water-mark rounding; the flaw was then fixed. This was a demonstration of a detected and corrected issue, not a report of losses from a deployed vault.

The difficult part remains deciding whether the specification captures the right requirements. A proof can check code against stated properties, but it does not by itself establish that those properties cover every risk. The article therefore treats checking specification quality—and starting team reviews with the intended properties—as central to reviewing AI-generated code.

Further reading