Invariant Driven Development - Build a CDP system using Invariants as Safety Nets

Опубликовано: 08 Февраль 2026
на канале: Alex the Entreprenerd
530
13

Learn about Invariant Driven Development:
Build a system
Write invariants
Use the invariants to offer "bounds" of behaviour

By using Invariants you can give yourself room for changing the implementation while maintaining base line guarantees

In this video we build a CDP System that is chunked into different modules:
Deposits
Liquidations
Borrowing tokens

We then set them up and test that basic functionality

We then strengthen our tests by writing a few global Invariants, which we can use for the entirety of our development as a means to ensure that the system behaves as intended

By thinking and writing invariants earlier, we are able to maintain a lot of freedom with our implementation, while having a safety net when it comes to the code being broken

Throughout the video I use Recon Campaigns to setup a CI / CD that will have these invariants being run on each push

Making Invariant testing as convenient as possible

Use Recon:
https://getrecon.xyz/