Skip to content

chore: complete final protocol hardening pass - #2

Merged
alsaecas merged 4 commits into
mainfrom
chore/final-hardening
Aug 17, 2026
Merged

chore: complete final protocol hardening pass#2
alsaecas merged 4 commits into
mainfrom
chore/final-hardening

Conversation

@alsaecas

Copy link
Copy Markdown
Owner

Summary

Performs a repository-wide final hardening pass while preserving the protocol architecture and settlement implementation.

  • strengthens adversarial EIP-712, ERC-1271, token-failure, rounding, and lifecycle tests;
  • makes the invariant handler attempt forbidden fills after cancellation, nonce invalidation, and completion;
  • pins current OpenZeppelin, Slither, and GitHub Action versions;
  • aligns local and CI static-analysis policy and fixes CI-profile compatibility with older Foundry releases;
  • expands security, contribution, testing, and static-analysis documentation.

Security considerations

The settlement contract itself is unchanged: the audit did not identify a correctness flaw that justified modifying production logic. New regressions prove malformed or mutated signatures fail, chain-domain replay fails, false-returning token operations roll back atomically, arbitrary two-part fills settle the exact signed buy amount, and all terminal states block later fills.

The documented Slither exclusions remain limited to arbitrary-send-erc20 and timestamp, with the authorization and expiry rationale recorded in docs/STATIC-ANALYSIS.md.

Validation

Executed locally with Solidity 0.8.30 and the CI Foundry profile:

  • forge fmt --check — pass
  • forge lint — pass (informational ABI-hashing and test naming notes reviewed)
  • forge build --sizes — pass
  • forge test -vvv — 44 passed: 35 unit, 4 fuzz, 5 invariant
  • fuzz configuration — 4,096 runs per property
  • invariant configuration — 512 runs, depth 128 (65,536 calls per invariant)
  • production src/ coverage — 100% lines/statements/branches/functions
  • repository aggregate — 94.23% lines, 93.96% statements, 86.21% branches, 94.87% functions
  • Slither 0.11.6 — 27 contracts, 100 active detectors, 0 results after the two documented exclusions

Release note

This remains educational/reference software, has not undergone a professional security audit, and should not be used with meaningful funds.

@alsaecas
alsaecas marked this pull request as ready for review August 17, 2026 12:20
@alsaecas
alsaecas merged commit 2802ebb into main Aug 17, 2026
2 checks passed
@alsaecas
alsaecas deleted the chore/final-hardening branch August 17, 2026 12:20

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c5cd4a7ed7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Makefile
slither . --config-file slither.config.json

check: fmt lint build test
check: fmt lint build test coverage slither

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep make check usable with the documented prerequisites

On a fresh clone following the README quick start, the user installs only Foundry dependencies and then runs make check, but this new dependency invokes slither, which make install does not install and the README does not list as a requirement. The advertised quick-start command therefore ends with slither: command not found; either keep static analysis in the explicit slither/ci targets or update the quick-start prerequisites and setup to install Slither.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant