invariant-testing

Community

Deterministic invariant testing for DeFi contracts

Authorccashwell
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Invariant testing guides and automates stateful fuzz testing for DeFi contracts using Foundry, enabling repeatable, bounded exploration of contract invariants.

Core Features & Use Cases

  • Invariant templates and handler-based testing to validate that invariants hold across complex state transitions.
  • Ghost variable tracking to verify that on-chain state matches expected model state across random sequences.
  • Target configuration workflows to constrain functions and actors for focused testing, with time-warp handling for time-dependent protocols.
  • Production-grade invariant tests for security-critical contracts and DeFi protocols.

Quick Start

Set up a Vault with a Handler and run forge test to begin bounded invariant exploration on a DeFi protocol.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: invariant-testing
Download link: https://github.com/ccashwell/evm-cortex/archive/main.zip#invariant-testing

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.