The call for invariant-driven development
Summary: Trail of Bits argues that smart contract development needs a shift to invariant-driven development, embedding properties that must always hold into every stage of the software lifecycle, from design through monitoring and incident response. The firm notes its public reports contain invariants over six years old and that its Uniswap V4 review tested 100 invariants through fuzzing, formal methods, and custom static analysis, while warning that on-chain invariants carry their own risk, citing issue TOB-UNI-005 in its Uniswap V3 report that could have let a malicious user drain any Uniswap pool.
What's compelling: Most smart contract hacks stem from business logic or domain-specific flaws, and a single broken invariant in Uniswap V3 could have drained any pool, so the properties you choose to enforce on-chain are themselves attack surface.
Read the original at Trail of Bits Blog ↗