Smart Contract Security
Browse all Smart Contract Security articles.
17 min read
Loops in CVL: Path Explosion and Loop Unrolling
Loops are one of the most common programming constructs, but they remain challenging to reason about in formal verification.
14 min read
Invariants for ERC-721
In previous chapters, we explored how CVL invariants work: properties that must hold throughout all contract execution.
10 min read
Verifying an Invariant Using Ghost and Hook
In any correct ERC20 implementation, the sum of all account balances must always equal the total token supply.
9 min read
Persistent Ghosts
In previous chapters, we used ghost variables (via Sstore hooks) to record storage values and quantities that were not explicitly tracked in smart…
8 min read
Constraining the Ghost Values in Rules
In the previous chapter, we learned how ghost variables allow information to flow from hooks into rules.
12 min read
Introduction to Invariants in Certora
Up until now, we’ve focused on verifying the behavior of individual methods or sequences of methods — ensuring that a specific function call or set of…
13 min read
Formally Verify Solady WETH
ETH, widely used in DeFi for swaps, liquidity provision, staking, and collateral, needs an ERC-20-compatible version so protocols can interact with it…
5 min read
Overflow and Mathint
In CVL, the type mathint represents unbounded integers, unlike Solidity’s fixed-size types such as uint256.
8 min read
Introduction to Method Properties
In the previous chapter, we learned about parametric rules, which allow us to formally verify properties that are expected to hold regardless of which…
5 min read
Biconditional Operator
The biconditional operator enables us to assert if-and-only-if relationships between boolean values.
10 min read
Certora Prover: Formal Verification of Smart Contracts
Formal verification proves a smart contract meets its specification. Learn how it works, how it compares to fuzzing, and its limits, in the Certora book.
10 min read
Implication Operator
The implication operator is frequently used as a substitute for the if statement since it is cleaner.