AI
AI Agents and Automated Tools Cut Cost of Smart Contract Verification
Researchers combine LLM-driven agents with mechanical inference to automatically generate formal specifications for Move smart contracts, reducing verification overhead by up to 64% on simple code.
A team of researchers has developed a new approach to specification inference for Move smart contracts that pairs AI agents with automated program analysis to dramatically reduce the manual effort required for formal verification.
The Problem: Specification Overhead#
Formal verification is critical for proving correctness in smart contracts, but it demands extensive groundwork. Developers must write detailed contracts not just for high-level properties but also for many supporting functions—much of this work is formulaic and low-level. This specification burden has long stood in the way of wider adoption of formal methods in production environments.
A Hybrid Solution#
The researchers' system, integrated into the Move Prover, combines two complementary techniques:
- Agentic inference: A large language model agent orchestrates the specification-writing process, iteratively calling the Move Prover and refining its outputs
- Mechanical inference: A weakest-precondition (WP) analysis engine automatically derives logical specifications directly from code structure
The LLM acts as a controller, using the Move Prover as a tool to verify candidate specifications and guide further refinement.
Evaluation and Results#
The team tested their approach on 26 targets, including 24 real functions from the Aptos framework that had never been formally specified. Using two models from the same family (Sol 5.6 and Terra 5.6), they measured:
- Over 90% completion rates with or without mechanical inference, showing agentic inference is viable on its own
- 11–21% cost reduction overall when mechanical inference is added
- Dramatic 40–64% savings on code without loops, where weakest-precondition analysis is most effective
Why It Matters#
This hybrid approach sidesteps a traditional choice between pure automation and human expertise. By letting mechanical analysis handle formulaic specifications while AI agents navigate the harder, more nuanced inference decisions, the system cuts unnecessary computational costs and makes formal verification more practical for real-world smart contract development.

