Audit tooling

Pre-audit checklists

Pick a protocol category. You get the root causes that killed similar protocols, the protocols they killed, and the checks that find them.

AMM & DEX

01

Forked constant mismatch

A fork changes a constant (10000 vs 1000) and the invariant math silently breaks — classic death by copy-paste.

KilledUranium FinanceNowSwapNimbus

Checks

  • Diff every math constant against the original protocol it was forked from
  • grep -rn "1e3\|10000\|1000" <repo> in pair/pool math
02

Same-token pair price pump

A pair between a token and itself (or two correlated tokens) computes price from reserves — swapping the same token inflates it 1:1 and the pool values it as worth.

KilledMonoX ($31M)

Checks

  • Does the router reject tokenIn == tokenOut?
  • Check price = reserveA/reserveB when A and B are the same asset
03

Missing slippage / minAmountOut = 0

Swap paths without a minimum-out let anyone sandwich the entire output — the user gets dust, the attacker gets the difference.

KilledAlchemistAllocator (minIntermediateOut:0 class)Sushi/Uniswap clones

Checks

  • grep -rn "minAmountOut\|amountOutMin" <repo> — any call site passing 0 or omitting the check?
04

Fee-on-transfer / rebasing tokens

The contract books the full amount but receives less (or more) — the ledger desyncs from the real balance and the pool pays out other users' funds.

KilledMultiple 2021-22 token exploitsSafeDollar

Checks

  • Does the contract support fee-on-transfer tokens? If yes: book balances by measured delta, never by the argument
05

Emergency / burn path skips accounting

An emergencyBurn or migrate path moves funds without reconciling internal shares — deposit is counted twice.

KilledEleven Finance ($4.5M)PancakeBunny-family

Checks

  • grep -rn "emergency\|burn\|rescue" <repo> — does each path update shares/balances?
  • Test deposit→burn→withdraw: can you extract more than your deposit?
06

Read-only reentrancy (stale view)

A view/try-catch pattern reads the pool state mid-callback, so the attacker re-enters against stale pricing.

KilledCurve (read-only reentrancy class)

Checks

  • Any external call between reading a price/balance and using it?
  • Add a transient reentrancy guard even for view-based flows
07

LP share inflation / first depositor

A tiny first deposit + donation rounds the share price so later depositors mint 0 shares or lose value to rounding.

KilledBalancer (2020)Uniswap-v2 clones without MINIMUM_LIQUIDITY

Checks

  • First-depositor protection present?
  • Test deposit(1 wei) → donate → victim deposits — shares minted?