Proof
Each invariant is negated and handed to the Z3 SMT solver with an exact model of the contract's integer arithmetic, including every rounding direction. Unsat means no input in range can break it.
Formal verification / On-chain credit & vault accounting
We state what a protocol's accounting must never do, then prove it holds for every input in range — with Z3, an exact-integer replay of the deployed source, and planted bugs that every proof must catch.
I. Ledger
Every entry is reproducible from public, verified source. A result is recorded only after its mutation tests confirm the proof is not vacuous.
Entries are published only after each protocol has received notice. All research is independent, on public and verified source code: entries are not commissioned by, affiliated with, or endorsed by the protocols listed, and each result holds within the scope modelled in its report. It is not an audit or a guarantee of security.
II. Benchmark
We pinned each protocol's public source at a commit dated before its exploit and ran the same four invariants we use on every engagement: solvency, no profit loop, no unbacked minting, no authorization bypass. A case counts only if the violation replays with exact integers and the project's fix is proved to close it.
| Incident | Date | Reported loss | Invariant broken | Worst case found | Result |
|---|---|---|---|---|---|
| Euler FinanceDonation without a solvency check | 2023-03-13 | ~$197M | INV-SOLV · INV-PROFIT | Attacker more than doubles the equity put in | Flagged Fix proved |
| Nomad BridgeZero trusted root | 2022-08-01 | ~$190M | INV-AUTH | Solver selects root 0: any unproven message executes | Flagged Fix proved |
| Popsicle FinanceFee entitlement not settled on transfer | 2021-08-04 | ~$20M | INV-BACK | Pays out 2× the fees collected | Flagged Fix proved |
| bZx / FulcrumSelf-transfer balance caching | 2020-09-14 | ~$8M | INV-BACK | Balance doubles in one transfer | Flagged Fix proved |
| Hundred FinanceCompound V2 fork, empty-market rounding | 2023-04-15 | ~$7M | INV-PROFIT | Redeem pays 25%+ of market cash above share value | Flagged Fix proved |
| Cover ProtocolStale reward accumulator | 2020-12-28 | ~$4M | INV-BACK | Mints 2·10¹² × the period's emission | Flagged Fix proved |
| RaftShare mint rounded up | 2023-11-10 | ~$3.3M | INV-BACK | 1 wei deposited, 10¹⁸ credited | Flagged Fix proved |
Controls: the same invariants hold, with no counterexample, on OpenZeppelin ERC4626 v5 and the Uniswap V2 pair, and both catch a planted bug. This is a hindsight benchmark: each exploit was known before it was modelled, so it shows the method can express, detect, size and prove fixes for these bug classes, not how often a blind review would find them. Losses are public post-mortem figures, rounded. Protocols named here were not reviewed by us before their incidents and are not clients. Protocol, runner and pinned sources are available on request.
III. Method
A proof is only as good as its model. We test the model against the code, and the proof against deliberate failure.
Each invariant is negated and handed to the Z3 SMT solver with an exact model of the contract's integer arithmetic, including every rounding direction. Unsat means no input in range can break it.
The deployed source is transcribed line by line into exact-integer Python, with reverts modelled as atomic rollbacks, and driven through hundreds of thousands of randomized histories on live parameters.
We plant bugs — a flipped rounding, a missing term — and require every proof and replay check to catch them. A check that cannot fail is not reported.
IV. Proof
After a borrower default, a recovery price is floored once and applied to every claimant. Is any payout ever larger than its exact pro-rata share of the reserve?
from z3 import *
ONE = 10**18 # RECOVERY_FULL
R, T, b, price, pay = Ints("reserve total claim price pay")
s = Solver()
s.add(1 <= T, T <= 4 * 10**15, 0 <= b, b <= T, 0 <= R, R <= 4 * 10**15)
# price = floor(R * 1e18 / T)
s.add(price * T <= R * ONE, R * ONE < price * T + T, price >= 0)
# pay = floor(b * price / 1e18)
s.add(pay * ONE <= b * price, b * price < pay * ONE + ONE, pay >= 0)
# negate the invariant: some payout exceeds b * R / T
s.add(pay * T > b * R)
print(s.check())