All glossary terms
Security

Invariant

A condition that must always be true throughout a contract's execution. In Uniswap V2, the key invariant is x * y >= k after every swap. Violations of invariants indicate bugs or exploits. Invariant testing (fuzzing) is a powerful technique for finding vulnerabilities.

Related terms in Security