Skip to content

Mitigate accepted V12 audit findings - #14

Merged
dangerousfood merged 14 commits into
masterfrom
codex/v12-audit-mitigations-final
Aug 15, 2026
Merged

dangerousfood merged 14 commits into
masterfrom
codex/v12-audit-mitigations-final

Conversation

@dangerousfood

Copy link
Copy Markdown
Collaborator

Summary

  • align the Deepstate dependency lock metadata in the first commit
  • preserve a final DEEP default admin and reject invalid admin handoffs
  • bound Governor timing and fraction settings, enforce a quorum floor, and protect proposal admission at zero supply
  • prevent STATE from becoming trapped in its own vault and require a six-decimal USDG value token
  • add slippage-bounded ERC-4626 deposit/mint overloads while retaining the standard interfaces
  • require per-token minimum outputs for listed-asset redemptions
  • settle each rewarded side before an exhausted order book rotates, with an end-to-end historical-book claim test

Each accepted mitigation is isolated in one commit and labeled with its V12 finding ID. Findings addressed by one shared mechanism are grouped in that mechanism's commit.

Audit mapping

Finding Mitigation
#227534, #227535 Align dependency metadata with the intended Deepstate commit
#227408 Prevent revocation or renunciation of the final DEEP default admin
#227513 Require one past vote to propose when historical supply is zero
#227514 Cap voting delay at 30 days
#227515 Cap late-quorum extension at 7 days
#227516 Cap voting period at 30 days
#227517 Floor quorum at 1 STATE
#227518 Require at least a 1-day voting delay
#227519, #227520, #227522 Reject zero proposal and quorum fractions
#227523 Reject nonzero STATE transfers or mints to the vault itself
#227527 Require a six-decimal vault value token
#227528 Add bounded deposit and mint entry methods
#227529 Add per-asset minimums to listed redemption and disable the unsafe overload
#227435 Close rewarded book cursors before rotation

The #227435 engine change is implemented in Deepstate-Protocol/deepstate-contracts#33 and pinned here at 59e5bb25a023d96a50a78fb1bd8504b5aa8e14ad.

Validation

  • forge fmt --check
  • forge build --sizes --threads 0
  • 129 behavioral and fuzz tests passed
  • five reward invariants passed across 640,000 transitions with zero reverts
  • DeepstateVault coverage: 100% lines (156/156), statements (207/207), branches (39/39), and functions (28/28)
  • dependency suite: 435 tests passed, including 49,152 updated multi-pool invariant calls with zero reverts

@dangerousfood
dangerousfood merged commit c3ffdc0 into master Aug 15, 2026
3 checks passed
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