How it works

Every finding has to earn its verdict.

Guardix doesn't trust its own model. This is the full path from git clone to a verdict — and exactly what makes each KEEP and each KILL something you can check, not something you have to take on faith.

01The pipeline

From repository to verdict.

Five stages, each emitting an artifact the next one consumes. No single prompt decides anything — every claim is built up, then torn down, before it reaches the report.

  1. Clone & scope

    Pins the exact branch and commit, then walks the import graph so only in-scope Solidity enters the pipeline — vendored libraries and tests stay out.

    → emits commit e7b2f4a · 23 files in scope

  2. Architecture & invariants

    Maps contracts, inheritance, the call graph, and state and role flows; extracts the invariants the system is meant to hold, plus trust assumptions and design decisions.

    → emits INV-001…007 · 5 assumptions · 3 decisions

  3. Multi-method hunting

    Several complementary detectors run in parallel — not just a checklist. Checklist agents cover the known risk classes (reentrancy, oracle and price manipulation, access control, accounting and invariant drift); specialized skill agents and a Solidity vector scan go deeper; and adversarial passes probe numeric properties and cross-contract integration. Independent AI models propose — nothing is trusted yet.

    → emits 41 candidate findings

  4. Adversarial validation

    Every candidate goes on trial: grounded against the invariants, and — for criticals — reproduced as an exploit on a mainnet fork. A finding is killed only with a cited line.

    → emits KEEP / KILL / needs_manual per finding

  5. Versioned report

    Verdicts, exploit proofs, and architecture artifacts are assembled into one report pinned to the commit and diffable against the last scan.

    → emits report @ e7b2f4a

02 Stage 2

It models your system before it hunts for bugs.

Pattern matchers flag transfer() before a state write everywhere — including the dozens of places it's safe. Guardix first extracts what your system is supposed to guarantee, then judges every finding against that. An invariant the code is meant to hold is a first-class artifact in the report — and the yardstick a finding is measured by.

INV-001 state Vault.sol

Total supply equals the sum of balances at all times.

Threat if broken: direct loss of depositor funds.

anchored at Vault.sol:118 · _mint / _burn

Every invariant is tied to the function that establishes it — so a later verdict can point at the exact code an attack would have to violate.

call-graph · Vault adjacency
Vault.withdraw() calls token.transfer()
external
token.transfer() before balances[msg.sender] -= amount
state write after
Vault.withdraw() guarded by INV-001
supply = Σ balances

The graph is inter-procedural and crosses contract boundaries — so a reentrant path that hops through an external callback is visible, not hidden inside one function.

7 invariants · 5 trust assumptions · 3 design decisions extracted

03 Stage 4 · Validation

A verdict has to be earned — both ways.

A model flagging a bug is a claim, not a finding. Guardix attacks every claim from two sides: it tries to prove it real by reproducing it, and tries to prove it false by finding the line of code that defeats it. The verdict is whatever survives.

grounded & proven

Unchecked external callback before balance update

F-001 · critical · Vault.withdraw()

exploit · mainnet fork live
$ guardix exploit --fork mainnet @ 19,842,116
reentrancy executed — drained 142.8 ETH

Grounded in INV-001 (supply = Σ balances), which the exploit violates.

Reproduced on a fork. The PoC ships with the finding — criticals get a working fork exploit.

citation verified

Oracle staleness unchecked in PriceFeed.latest()

candidate · plausible

Uses a price older than the staleness window.

88 require(updatedAt > block.timestamp - MAX_AGE);

PriceFeed.sol:88

A kill is only valid when the validator can quote the line that defeats the exact attack step. No citation, no kill.

unresolved

Keeper can grief the liquidation queue

candidate · economic

No line of code defeats it — so it can't be killed.

No deterministic exploit reproduces it — so it can't be proven.

needs_manual · stays in front of a human

When neither side wins, Guardix does not silently drop it — it's surfaced for human review.

04Coverage

What it catches — and what it doesn't.

The classes below are where the verdict mechanism is strongest — reproducible attacks and citable defenses. Where neither exists, a human still wins, and Guardix says so.

Reentrancy
Cross-function and cross-contract reentrant paths — callbacks that run before a state write.
Oracle / price manipulation
Staleness windows, single-source feeds, and flash-loan-inflated spot prices feeding liquidation math.
Access control & privilege escalation
Unprotected admin entrypoints, missing timelocks, and role-boundary bypass.
Accounting / invariant drift
Divergence between internal accounting and the actual token balances a contract holds.
Unchecked external calls
Ignored transfer and call return values, and unhandled revert paths on external interactions.
Novel, bespoke attack paths
Exploits that don't resemble any known class — there's no checklist entry and no fork harness that reproduces them.
Economic & game-theoretic flaws
Incentive and mechanism-design failures that need human judgment, not deterministic reproduction. This is exactly why they surface as needs_manual.

Guardix is the repeatable, provable layer — run it first and on every fix, then spend the human budget where it actually pays. See the full comparison →

05Continuous

Re-run on every commit. Diffed against the last.

Each scan is pinned to a commit, so re-running after a fix proves the fix — no false closure. The verdict isn't a one-time PDF; it's re-earned every time the code moves.

vault-core · scan history main
e7b2f4a latest · today latest
c91d3e8 previous · 2 days ago

−2 critical, −4 high vs previous scan

Run it on your own commit.

Connect a repo, pick a commit, and read the verdicts — exploit proofs, cited refutations, and architecture artifacts in one report.