Enhance your blockchain security with our Invariant Testing & Development, which focuses exclusively on
identifying, developing, and testing invariants. While security reviews typically contain some development
of invariants in areas believed to contain bugs, this service is focused entirely on invariants to achieve a
more holistic approach to long-term security.
Invariant identification
Our skilled engineers collaborate with your team to pinpoint invariants for your system. These may
include function- or system-level invariants. We'll specify these and their preconditions not just
in code but in plain English, ensuring a tailored approach for your development.
Invariant writing
We translate invariants into Solidity and determine the optimal testing method (internal, external,
or partial testing), create necessary wrappers, and establish fuzzing initialization with contract
deployments and preconditions. Our goal is minimal disruption to your codebase, selecting an
approach that ensures long-term use of the invariants.
Invariant testing and integration
We run invariants locally and on dedicated cloud infrastructure, refining specifications based on
fuzz testing results. Collaborating with your team, we integrate short-term fuzzing into CI (e.g.,
GitHub actions) and provide recommendations for long-term fuzzing campaigns, locally or in the
cloud.
Training and guidance
We also include developer training through regular meetings throughout the service. We provide
guidance and advice on how to maintain the provided invariants, write new ones, and improve the
system’s design. Upon request, we can provide half a day of dedicated training, delving into the
nuances of various testing methodologies and best practices.
Trail of Bits stands as a pioneer in Blockchain Invariant Development. Our seasoned engineers have been
writing invariants for more than half of a decade (for examples, see the
Balancer, Primitive,
and
Liquity
reports), authored multiple fuzzers (Echidna,
Medusa,
test-fuzz), and delivered several educational
materials on fuzzing (+150 pre-defined invariants,
10-hour fuzzing workshop,
fuzzing tutorials).
This service will help your team to become proactive instead of reactive in securing your codebase,
identify and develop the most impactful invariants, and
educate the team on invariant-driven development.
Explore our Invariant Development Engagements:
Public Report for Curvance