Skip to content

Settle reward hooks before exhausted book rotation - #33

Merged
dangerousfood merged 1 commit into
masterfrom
codex/v12-book-rotation-settlement
Aug 15, 2026
Merged

dangerousfood merged 1 commit into
masterfrom
codex/v12-book-rotation-settlement

Conversation

@dangerousfood

Copy link
Copy Markdown
Collaborator

Summary

  • finalize each enabled bid and ask hook before an exhausted book is rotated
  • report the historical book's live top amount with an incoming nonce of zero, then disable its hook flags
  • preserve the existing 200,000 gas cap and best-effort hook failure boundary
  • cover both-side closure directly and extend the multi-pool invariant model across recording and reverting hook configurations

Audit

Mitigates V12 finding #227435 by preventing a reward cursor from remaining attached to an exhausted historical book.

Validation

  • forge fmt --check
  • forge build
  • forge test
  • 435 tests passed, including 49,152 calls across the three updated multi-pool invariants with zero reverts

@dangerousfood
dangerousfood force-pushed the codex/v12-book-rotation-settlement branch from 59e5bb2 to 37aa0d2 Compare August 15, 2026 02:04
@dangerousfood
dangerousfood merged commit bf18c54 into master Aug 15, 2026
19 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