Rust-based toolkit for Ethereum smart contract development, with Forge, Cast, Anvil and Chisel for building, testing, and interacting with EVM chains.
crytic/echidna
Echidna is a Haskell-based fuzzer that tests Ethereum smart contracts by trying call sequences to break user-defined invariants or Solidity assertions.
- Stars
- 3,189
- Forks
- 436
- Open issues
- 107
- Last commit
- 24 hours ago
What is it?
Echidna is a fuzzing and property-based testing tool for Ethereum smart contracts. It generates grammar-based call sequences from a contract's ABI and checks user-defined invariants, which are functions prefixed with echidna_ that return a bool, or Solidity assert() statements. When it finds a sequence that falsifies a property, it reports that sequence, and it can minimize the test case for easier triage.
The tool supports several testing modes, including property, assertion, Foundry-style tests, formal-style verification of single transactions, integer overflow detection, optimization of int256 return values, and coverage-only exploration. It works with contracts built by Foundry, Hardhat, and Truffle through crytic-compile, and uses Slither to extract information before fuzzing. Results can be shown in an interactive terminal UI, plain text, or JSON, and a coverage-maximizing corpus can be saved and annotated on the source code.
Key features
- 01Generates call sequences tailored to a contract's ABI and source code.
- 02Tests echidna_ prefixed boolean invariants and Solidity assertions.
- 03Minimizes failing test cases for quicker triage.
- 04Reports line coverage with source code annotations.
- 05Supports text, JSON, and interactive terminal output.
- 06Integrates with Foundry, Hardhat, and Truffle projects via crytic-compile.
Use cases
- Finding invariant violations in DeFi protocol contracts before deployment.
- Checking token contracts for balance or overflow bugs.
- Running smart contract property tests in a GitHub Actions workflow.
- Reproducing fuzzing research examples on Solidity contracts.
Quick start
- 1
Install Echidna with Homebrew (macOS / Linux)
brew install echidna - 2
Run Echidna on the example contract from the README
echidna tests/solidity/basic/flags.sol
Things to know
- Vyper support is limited.
- Some library support for testing is limited.
- Installing Echidna requires Slither, which is an extra dependency to set up.
- Container images currently only build on x86 systems.
In collections
Topics
FAQ
- What is echidna?
- Echidna is a Haskell-based fuzzer that tests Ethereum smart contracts by trying call sequences to break user-defined invariants or Solidity assertions. Echidna is a fuzzing and property-based testing tool for Ethereum smart contracts. It generates grammar-based call sequences from a contract's ABI and checks user-defined invariants, which are functions prefixed with echidna_ that return a bool, or Solidity assert() statements. When it finds a sequence that falsifies a property, it reports that sequence, and it can minimize the test case for easier triage.
- Is echidna free to use? What license does it have?
- echidna is open source under the AGPL-3.0 license. Check the license terms before using it in commercial products.
- Is echidna still maintained?
- Actively maintained. The last commit to echidna was on Nov 6, 2026.
- What can I use echidna for?
- Finding invariant violations in DeFi protocol contracts before deployment. Checking token contracts for balance or overflow bugs. Running smart contract property tests in a GitHub Actions workflow. Reproducing fuzzing research examples on Solidity contracts.
- How do I install echidna?
- Install Echidna with Homebrew (macOS / Linux): brew install echidna Run Echidna on the example contract from the README: echidna tests/solidity/basic/flags.sol
- Where can I get echidna?
- The source code and installation instructions are on GitHub: https://github.com/crytic/echidna
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Ethereum development environment for compiling, deploying, testing, and debugging smart contracts and dapps.
Go implementation of the Ethereum execution layer, running as a full or archive node with JSON-RPC access and developer tools.
A property-based testing library for Python that generates test inputs automatically and shrinks failures to minimal examples.
Solidity is a statically-typed, contract-oriented programming language for writing smart contracts on the Ethereum platform.
The second edition of "Mastering Ethereum", a book covering Ethereum development, smart contracts, and the network's underlying technology.