Skip to content

Add stablecoin supply invariant test#45

Merged
Pattermesh merged 1 commit into
kcolbchain:mainfrom
bonginkan:codex/stablecoin-invariant-25
Jun 3, 2026
Merged

Add stablecoin supply invariant test#45
Pattermesh merged 1 commit into
kcolbchain:mainfrom
bonginkan:codex/stablecoin-invariant-25

Conversation

@MyTH-zyxeon
Copy link
Copy Markdown
Contributor

Summary

  • add a Foundry invariant handler for Stablecoin mint/burn sequences
  • assert totalSupply always equals cumulative mints minus burns
  • wire Foundry to use forge-test and vendor the forge-std source needed by existing tests

Fixes #25

Testing

  • forge test --mt invariant_ -vvv
  • forge test

@abhicris
Copy link
Copy Markdown
Contributor

🤖 Audit skipped — diff is 956KB (limit 64KB). Labelling for human review.

@MyTH-zyxeon MyTH-zyxeon force-pushed the codex/stablecoin-invariant-25 branch 2 times, most recently from 607236a to 9d9d126 Compare May 20, 2026 18:24
@MyTH-zyxeon
Copy link
Copy Markdown
Contributor Author

Updated to address the human-review label from the large diff audit.

Changes in the refreshed branch:

  • removed the vendored forge-std tree from the PR
  • replaced it with a tiny local test helper for the existing Foundry tests
  • kept the new invariant test focused on totalSupply == net mint/burn accounting

Verification rerun locally:

  • forge test --mt invariant_ -q
  • forge test -q

The branch diff is now 3 files / 180 insertions instead of ~956KB.

@Pattermesh Pattermesh force-pushed the codex/stablecoin-invariant-25 branch from 9d9d126 to 3412fdb Compare June 3, 2026 12:29
@Pattermesh Pattermesh merged commit c0ed269 into kcolbchain:main Jun 3, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[good first issue] Add invariant test for total supply across mint/burn cycles

3 participants