Carry pending points in the migration snapshot - #4
Conversation
Stakers who never pressed compound were losing their claimable bnBMX in the migration carry - 431,524 points across 280 stakers, 18.7% on top of the staked total. snapshotPoints is now staked points plus bonusBmxTracker.claimable, both read at the same pinned block. - readStakedPoints/aggregate: read claimable alongside depositBalances; leaf points = staked + pending; snapshot.csv gains the two component columns - validate: sample re-reads cover claimable; the exact totalDepositSupply reconciliation stays on the staked component (pending has no on-chain aggregate, so it is checked per-account and by the independent verifier) - verifyBaseStaking: same leaf definition, so its independently derived root must still match byte-for-byte - prod-2026-07-21: regenerated at the same pinned blocks (17:00 EEST), new root 0x6fc870a6d7ff5d2be147104da95d5da54c564c673151c150245a7547f277fa32, 280 leaves. The staked-only root from the previous commit was never published on-chain.
PR SummaryHigh Risk Overview Docs and publish artifacts are updated accordingly: README describes the new leaf formula and that validate (b) reconciles only the staked-points component (pending is checked per-account / via Reviewed by Cursor Bugbot for commit afe5639. Configure here. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (11)
📝 WalkthroughWalkthroughThe snapshot pipeline now includes pending, un-compounded points in Merkle leaves. Readers, aggregation, validation, verification outputs, and the July 21 production snapshot artifacts were updated accordingly. ChangesPending points snapshot pipeline
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant verifyBaseStaking
participant feeBmxTracker
participant bonusBmxTracker
participant validate
verifyBaseStaking->>feeBmxTracker: Read staked points
verifyBaseStaking->>bonusBmxTracker: Read pending points
verifyBaseStaking->>validate: Verify combined leaf points
validate->>feeBmxTracker: Reconcile aggregate staked points
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: afe56392b9
ℹ️ 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".
What
snapshotPointsin each merkle leaf now includes pending un-compounded points (bonusBmxTracker.claimable) on top of staked points, read at the same pinned snapshot block (2026-07-21 17:00 EEST). New root:0x6fc870a6d7ff5d2be147104da95d5da54c564c673151c150245a7547f277fa32, 280 leaves.Why
All 280 snapshot stakers had claimable bnBMX they never compounded - 431,524.41 points in total, 18.7% on top of the staked-points total, with individual cases as large as 58k (one staker had never compounded once and would have carried zero). These would have compounded eventually, so the snapshot carries them rather than punishing stakers for not pressing compound before the freeze.
Changes
readStakedPoints/aggregate: readclaimablealongsidedepositBalances; leaf points = staked + pending;snapshot.csvgains the two component columnsvalidate: sample re-reads cover the pending component; the exacttotalDepositSupplyreconciliation stays on the staked component (pending has no on-chain aggregate, so it is verified per-account and by the independent verifier)verifyBaseStaking: same leaf definition through its own discovery + read pathprod-2026-07-21/: regenerated artifacts (root, tree, proofs, community CSV, verification record, staker cache)Verification
totalDepositSupplyon both trackersnpm run validateall green, incl. pool coverage (2,709,469.8 migratable vs 2,711,068 pool)Reviewer notes
0x277d5544...ccd895) is superseded and was never set on-chain;setMerkleRootmust use the new root onlyprod-2026-07-21/community-snapshot.csvSummary by CodeRabbit
New Features
Bug Fixes
Documentation