To check a Uniswap v2 swap, compare the pool’s reserves before and after the trade. The fee-adjusted constant-product rule constrains how those reserves can change. A snapshot of the final balances alone cannot tell you whether the swap respected the rule. That distinction captures what a smart contract invariant does: it states a condition that contract operations must preserve.
Foundry’s fuzz tests exercise a contract with varied inputs and check whether the invariant holds in the cases tested. Certora Prover approaches the question in two parts: does the condition hold in the initial state, and does each operation preserve it whenever it already holds? The first check establishes a starting point; the second checks whether the contract can leave the set of states that satisfy the condition.
What developers ask the tool to check matters as much as which tool they use. A weak invariant can hold even when the behavior a developer cares about is wrong. Stronger invariants rule out more behavior, but assumptions and filters can make a check unsound if they exclude states the contract can actually reach. A proof establishes the stated property under its assumptions, not a requirement left out of the specification.
The Uniswap v4 solvency proof illustrates the difference between the goal and the facts needed to establish it. Proving the core solvency invariant requires supporting invariants as well as assumptions about how tokens behave. AutoProver can help generate candidate properties, tests and Prover rules for that workflow. A generated property is a proposal for what to check, not a proof that the contract is solvent.

