We manage your security to weather the AI storm →

Invariant fuzzing audits for smart contracts

An invariant fuzzing audit turns your protocol’s safety properties into executable invariants, then fuzzes every reachable state against them. At Guardian it runs inside every smart contract audit, and the suite stays in your repository.

50 Public reports with an invariants table
1,500+ Invariants published
180+ Broken under fuzzing
140M+ Fuzzing runs on Synthetix BFP
13,279 Lines of Guardian tests in GMX’s repo

Smart contract audits for

  • GMX
  • USDT0
  • LayerZero
  • Ethena
  • Synthetix
  • Jupiter
  • Yuga Labs
  • Orderly Network
  • Olympus
  • Limit Break
  • M0
  • Dolomite

Onchain · Invariant Fuzzing

What has to hold, whatever order the calls arrive in.

  • Solvency What the protocol holds covers what it owes. In MUX’s report: “Collateral pool’s aum is always greater or equal to reservedUsd.”
  • Caps and limits Limits hold under any sequence of calls. MUX’s “Total open interest in USD for a market must not exceed its configured cap” broke under fuzzing.
  • Accounting Balances, shares and claims add up. In Nashpoint’s report: “Escrow Asset Balance Must Be >= Sum Of All claimableAssets.”
  • Fees and rewards No one is paid more than was earned. In Gamma’s limit orders report: “The sum of user fees for a position never exceeds the total fees.”
  • Rounding and math Formulas behave at the edges, where AI is weakest. MUX’s “Filling a position should not fail due to rounding” broke.
  • Liquidations The checks that keep the protocol solvent never fail. In Synthetix’s BFP Market report: “isPositionLiquidatable never reverts.”
  • State machines Orders, requests and positions move only through allowed states. Gamma: “An order that is executed should not be able to be executed again.”
  • Pools and liquidity Liquidity never goes negative or overflows. In Poolshark’s Limit report: “Pool liquidity never underflows.”

50 of Guardian’s public reports list the suite’s invariants and mark each one Held or Broken, so you can read what was asserted before you book. The examples above are from MUX, Nashpoint, Gamma, Synthetix and Poolshark.

How it runs

From properties to a suite you keep

  1. 01

    Properties

    Guardian’s fuzzing researchers write down what must always hold: solvency, accounting, limits, and what each role may do.

  2. 02

    Harness

    Each property becomes an executable invariant in a stateful harness that fuzzes beneath both teams’ review.

  3. 03

    Fuzz and triage

    Each invariant meets random call sequences, often millions of times. A broken one is worked back to its cause, and only human-verified findings reach the report.

  4. 04

    Hand over

    The suite stays in your repository as a regression harness for fixes, retesting and every change you ship afterwards.

The suite is one of three passes over the same code. Team A pairs expert manual review with it, Team B runs Helix, Guardian’s AI auditor, and Guardian’s Head of Fuzzing leads the practice that builds it.

Public findings

Bugs Guardian’s fuzzing caught.

Each card links a finding in a public Guardian report that the GMX client story or the Umami and Orderly case studies credit to fuzzing. All were resolved.

  1. C-01GMX GLV · Critical

    Above the PnL cap, GLV valued GM tokens differently on deposit and withdrawal, so an attacker could mint low and redeem high, repeatedly. It is the kind of bug invariant fuzzing catches and a manual read passes over.

    Accounting Read the finding C-01 in the GMX GLV report

  2. AV-1Umami · Critical

    A request made in one asset vault could be cancelled in the other, refunding USDC for an ETH deposit.

    State machines Read the finding AV-1 in the Umami GMI Index report

  3. ATPH-2Orderly · Medium

    Half-up rounding returned −1 for 10 divided by 11, because a zero quotient took the negative branch.

    Rounding Read the finding ATPH-2 in the Orderly Perpetuals Protocol report

“Having seen many audits over many years, no one even comes close to Guardian’s approach, and the quality of the audit is unmatched.”
KalebSynthetix

Published work

Suites that stayed with the code.

Questions

Invariant fuzzing questions

What is invariant fuzzing?

Invariant testing checks a property instead of single cases. Each invariant states something that must always hold, such as “isPositionLiquidatable never reverts”, and the fuzzer drives random sequences of calls through the reachable states, looking for one that breaks it.

Is invariant fuzzing included in a Guardian audit?

Yes. Every smart contract audit and every Vanguard engagement includes an invariant suite. Team A pairs manual review with it, and the suite stays with you for every later change.

Which protocols need smart contract fuzzing most?

Every Guardian smart contract audit includes a suite, but it matters most for new lending markets, AMMs and stablecoins, and for pricing and math cores. If you upgrade often, rerun the suite in CI on every change.

Does fuzzing replace manual review?

No. Manual review and AI both depend on asking the right question, and AI is weakest on the rounding cases that matter. Fuzzing starts from a property that broke and works back to the bug, so Guardian runs all three on the same scope.

Which fuzzers do you use?

Guardian’s public case studies describe Echidna harnesses for Synthetix’s BFP Market and Poolshark’s Limit. Our Foundry invariant testing guide shows how handlers, ghost variables and actors work in practice.

How is fuzzing different from formal verification?

Fuzzing hunts for call sequences that break a property you wrote. Formal verification checks whether it holds for every input, and needs specialists writing specs. Formal verification vs fuzzing vs audit suggests fuzzing for accounting-heavy code, and formal verification for a few critical properties in stable, high-value code.

Resource Hub

Before you book an audit.

Smart Contract Audit

Other engagements

Start now

Get a quote for an audit with invariant fuzzing.

Get a quote