A technical walkthrough published on November 24, 2026, at 13:20:51 (UTC+08:00) illustrates smart contract invariants with Uniswap v2’s fee-adjusted constant-product constraint. The question is not simply “What are the pool’s reserves?” but “Given the reserves before a swap, do the reserves after it satisfy the constraint once fees are accounted for?” A single snapshot cannot answer that question.
How do you check an invariant? Foundry fuzz testing exercises state transitions and checks the property in the cases it generates. With Certora Prover, the check has two parts: establish that the invariant holds in the initial state, then show that if it holds before a transition, it still holds afterward.
When writing a weak or strong invariant, specify when the property must hold. Check the scope of the proof as well: a specification can omit a requirement, and an assumption or filter can exclude a state the contract can actually reach. Passing the check does not establish a claim that the specification never tested.
What does a solvency proof depend on? In the Uniswap v4 example, proving the core solvency invariant requires auxiliary invariants and explicit assumptions about token behavior. Those assumptions matter when interpreting the result. AutoProver can help generate candidate properties, tests and Certora Prover rules, but a generated candidate is not itself a proof.

