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.

Lending & Borrowing

01

Spot-pool price as collateral oracle

A pool whose reserves the attacker can move is used to price collateral — flash loans let the price be moved, then borrow against it.

KilledHundred FinanceVenusMoola Market

Checks

  • grep -rn "getReserves\|price0Cumulative\|TWAP" <repo>
  • Check every collateral price source: is it a Chainlink feed, a TWAP, or a live pool read?
  • Test: flash-loan the pricing pool by 20% — does max-borrow change?
02

Donation / share-price inflation

Transferring tokens directly to a vault inflates its share price or the apparent balance, which an attacker redeems or borrows against.

KilledVenus THECurve LlamaLendBalancer (2020)

Checks

  • grep -rn "balanceOf(address(this))" <repo> — every raw balance used in math is a donation surface
  • Check the first-depositor guard: virtual shares / MINIMUM_LIQUIDITY present?
  • Test: donate 1 token then deposit/redeem — any gain?
03

Reward-accrual checkpoint missed

An action that changes a reward-earning position (merge, split, kill gauge, poke) skips the accrual/checkpoint update — rewards double-count or leak.

KilledAlchemix (16 criticals from one poke bug)Yearn yDAI

Checks

  • For every position-mutating function: is _updateRewards / checkpoint called BEFORE the mutation?
  • grep -rn "function poke\|function merge\|function reset" <repo>
04

Reentrancy in borrow / withdraw

ERC777/ERC721 callbacks or plain external calls after a stale health check let an attacker re-enter and borrow repeatedly against the same collateral.

KilledLendf.MeCream FinanceOmni

Checks

  • grep -rn "safeTransferFrom\|.call(" <repo> — is state updated BEFORE every external call?
  • Check for nonReentrant on all borrow/withdraw/liquidate paths
05

Bad-debt liquidation socializes losses

Insolvent-position fees are paid from a shared pool (fee vault, insurance fund) — mass insolvency drains it, or the fee math lets liquidators extract more than the position holds.

KilledAlchemix (calculateLiquidation outsourced fee)Fluid Protocol

Checks

  • Trace the liquidation fee source when debt >= collateral
  • Test: insolvent position with feeBps=100% — who pays?
06

Unguarded initializer

A proxy implementation or contract with a public initialize() and no initialized-guard lets anyone re-run init and take ownership.

KilledHarvest FinanceParityAudius

Checks

  • grep -rn "function initialize\|function init" <repo> — is there an initializer modifier or a first-call guard?
  • For every proxy: can anyone call the implementation directly?
07

Interest / index rounding

Index updates that floor or ceil in the protocol-favored direction compound over time, or an off-by-one lets users time deposits between accruals.

KilledSilo FinanceDFX (2-decimal token)

Checks

  • Derive the index update: which direction does rounding favor, and does it compound?
  • Test same-block deposit→accrue→withdraw