Skip to free scan

How to Use Slither, Mythril, and Echidna Together

Firepan Security TeamOctober 29, 2026

Short answer: Slither is a static analyzer that reads Solidity or Vyper source and flags known risky patterns in seconds. Mythril uses symbolic execution on EVM bytecode to search for transaction sequences that reach a vulnerable state. Echidna is a property-based fuzzer: you write the invariants, and it generates transaction sequences that try to break them. They answer different questions, so most serious teams use more than one. This guide is the hands-on companion to our smart contract security tools comparison, which also covers where Firepan HOUND AI fits.

What Each Tool Actually Does

Slither: static analysis

Slither, maintained by Trail of Bits' Crytic team, compiles your project and analyzes an intermediate representation of the code without executing it. It ships with roughly 100 built-in detectors — reentrancy variants, unchecked low-level calls, dangerous delegatecall, shadowing, missing events, and many more — and the project reports an average execution time of under one second per contract. It also supports Vyper and exposes a Python API for writing custom detectors.

What that means in practice:

  • Good at: fast, repeatable checks for well-known patterns on every change; code-comprehension printers (inheritance graphs, function summaries); custom project-specific rules.
  • Weak at: anything that depends on runtime values or protocol intent. A detector can tell you an external call happens before a state write; it cannot tell you whether your liquidation math is economically sound.
  • Noise: findings need triage. Slither supports inline suppression comments and a triage mode so accepted findings stay quiet on later runs.
function withdraw(uint256 amount) external {
    require(balances[msg.sender] >= amount, "insufficient");
    (bool ok, ) = msg.sender.call{value: amount}(""); // external call first
    require(ok, "transfer failed");
    balances[msg.sender] -= amount;                    // state written after
}

Slither's reentrancy detectors flag this shape because the balance is updated after control passes to msg.sender — a violation of checks-effects-interactions. See the reentrancy reference for how the drain works.

Mythril: symbolic execution

Mythril, maintained under Consensys Diligence, treats inputs and storage as symbolic values and explores execution paths through EVM bytecode, using an SMT solver to decide whether a path to a problem state is feasible. Findings are tagged with SWC Registry identifiers.

  • Good at: finding concrete transaction sequences that reach states like unprotected selfdestruct, arbitrary storage writes, integer issues in older compilers, or assert violations — including on deployed bytecode with no source available.
  • Weak at: scale. Path explosion grows with contract size and transaction depth, so runs are bounded with -t (maximum transactions) and --execution-timeout. A clean Mythril run means "nothing found within these bounds," not "proven safe."
  • Not formal verification. Mythril searches for counterexamples; it does not prove that an invariant holds for all inputs. If you need proofs, look at tools such as the Certora Prover or Halmos, and the formal verification glossary entry.

Echidna: property-based fuzzing

Echidna, also from Crytic, generates sequences of calls against your contract's ABI and checks properties you define. In property mode those are functions prefixed with echidna_ that take no arguments and return a boolean; assertion mode checks assert() failures; a Foundry mode runs Foundry-style invariant tests.

contract TokenEchidnaTest is Token {
    constructor() Token(1_000_000e18) {}

    // Total supply must never change through ordinary transfers.
    function echidna_supply_is_constant() public view returns (bool) {
        return totalSupply() == 1_000_000e18;
    }
}
echidna . --contract TokenEchidnaTest --config echidna.yaml
  • Good at: stateful bugs that only appear after a specific sequence of calls — accounting drift, broken invariants across deposits and withdrawals, rounding that accumulates. When a property breaks, Echidna shrinks the failing sequence to a minimal reproduction.
  • Weak at: anything you did not write a property for. Echidna's quality is bounded by the quality of your invariants and by how much of the state space the campaign reaches (testLimit, seqLen, corpus reuse).

Side-by-Side Comparison

SlitherMythrilEchidna
TechniqueStatic analysisSymbolic executionProperty-based fuzzing
InputSolidity / Vyper source (compiled project)EVM bytecode (from source or on-chain address)Compiled contracts plus your test harness
You must provideNothing to startBounds (transaction depth, timeout)Invariants / properties
Typical speedSecondsMinutes; grows with depthMinutes to hours; you set the budget
OutputPattern findings by detector and impactSWC-tagged issues with a transaction traceFalsified properties with a shrunk call sequence
Best fitEvery pull requestTargeted review of critical contractsStateful logic and accounting
Main limitationNo runtime or intent awarenessPath explosion on large systemsOnly finds what properties describe

Two other tools come up in the same conversations. Foundry invariant tests (forge test) give you stateful fuzzing inside the test framework many teams already use; see the Foundry invariant testing guide. Medusa, also from Crytic, is a parallelized, Go-based smart contract fuzzer inspired by Echidna.

How to Combine Them

A practical sequence for most Solidity teams:

  1. Slither on every pull request. It is cheap enough to run on every change and catches regressions in seconds. Our GitHub Actions guide has a working workflow with SARIF upload.
  2. Write invariants early, then fuzz them. Start with Foundry invariant tests or Echidna properties for the accounting rules your protocol cannot violate: supply conservation, solvency, share price monotonicity. Run short campaigns in CI and long campaigns nightly or before release. See invariant testing.
  3. Use Mythril selectively. Point it at small, high-value contracts or at deployed bytecode you need to sanity-check, with explicit bounds.
  4. Keep human review for design. None of these tools reason about business intent, economic incentives, governance, or cross-protocol composability. That is where manual review and AI-assisted auditing add coverage the tools structurally cannot.

Where Firepan Fits

Firepan is not a replacement for any of these tools. Its analysis combines deterministic checks, HOUND AI review of repository code, and best-effort Slither corroboration, with findings presented as evidence tied to files and code paths. Mythril and Echidna are not part of Firepan's pipeline — keep them in your own workflow. You can run a free scan of a public repository to see what that evidence looks like on your code.

Frequently Asked Questions

Q: Is Slither better than Mythril?

A: They are not substitutes. Slither is a fast static analyzer for known patterns in source code; Mythril is a slower symbolic-execution tool that searches bytecode for reachable problem states. Slither suits every pull request; Mythril suits targeted, bounded analysis of critical contracts.


Q: Do I need all three tools?

A: Not necessarily. Slither plus well-written invariant tests (Echidna or Foundry) covers a lot of ground for most teams. Add Mythril when you need bytecode-level analysis or a second technique on high-value contracts. No combination replaces an expert review of protocol design.


Q: Does Mythril prove my contract is safe?

A: No. Mythril searches for counterexamples within the bounds you set. A clean run means nothing was found within those bounds. Proving properties for all inputs requires formal verification tools such as the Certora Prover or Halmos.


Q: Does Slither support Vyper?

A: Yes. Slither supports both Solidity and Vyper projects. Check the detector documentation for which detectors apply to Vyper code.


Q: What is the difference between Echidna and Foundry fuzzing?

A: Both run stateful, property-based fuzzing. Foundry invariant tests live inside your existing Forge test suite, which keeps setup simple. Echidna is a dedicated fuzzer with its own configuration, corpus management, and modes, and it can also run Foundry-style tests.


Q: Are these tools free?

A: Yes. Slither, Mythril, and Echidna are open-source projects available on GitHub.

Sources

Firepan

Scan Your Contracts Now

Run a free scan — results in minutes, no credit card required.

Run Free Scan →