Skip to content

test(move): assert staking Σclaims ≤ Σdeposited (reward conservation) - #742

Merged
maxmoneycash merged 1 commit into
mainfrom
agent5/staking-conservation-test-1782162855
Jun 22, 2026
Merged

maxmoneycash merged 1 commit into
mainfrom
agent5/staking-conservation-test-1782162855

Conversation

@maxmoneycash

Copy link
Copy Markdown
Member

The staking audit fuzz-verified (20k trials) that stakers can never claim more than deposited (accrue floors per-share, banks full amount → dust stranded, never over-pays), but no committed test asserted it. Pin it (2:1 stakes + odd dividend → remainder; both claim; assert sum ≤ deposited). Closes the last audit-campaign coverage gap (after touch_below #735, WICK supply #741). No source change.

🤖 Generated with Claude Code

The staking-pool audit verified via a 20k-trial fuzz that stakers can never
collectively claim more than was deposited (accrue floors the per-share delta but
banks the full amount into pending, so truncation strands dust — never over-pays),
but no committed test asserted Σclaims ≤ Σdeposited directly. Pin it: a 2:1 stake
split + an odd dividend (so the per-share division leaves a remainder), both
stakers claim, assert the sum ≤ deposited. Closes the last coverage gap the audit
campaign flagged (after touch_below #735 and WICK supply #741). Passes; no source
change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@maxmoneycash
maxmoneycash merged commit b6313cb into main Jun 22, 2026
1 of 2 checks passed
@vercel

vercel Bot commented Jun 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
wick-markets Building Building Preview, Comment Jun 22, 2026 9:16pm

Request Review

maxmoneycash added a commit that referenced this pull request Jun 22, 2026
#742) (#744)

The suite reached 695/695 after the staking Σclaims≤Σdeposited test (#742) landed
just after the last count-sync to 694. Verified live: sui move test → 695/695.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
maxmoneycash added a commit that referenced this pull request Jun 22, 2026
…he staking-pool conservation (#745)

#742 added claims_never_exceed_deposited_dividends (suite → 695) without syncing
docs, so the reality-guard (#738) went RED again (694 vs 695). Sync all docs to
695 (verified actual) — guard green — and map the staking reward-pool conservation
property (Σ claims ≤ Σ deposited; the pool can't be drained beyond what was funded,
independent of the anti-loop cap) into SAFETY.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
maxmoneycash added a commit that referenced this pull request Jun 22, 2026
…k) (#746)

#744 synced only the README to 695 (staking-conservation test #742), leaving
SAFETY.md, deployments/ADDRESSES.md, and the v4.26 runbook at 694. Both count
guards went red (check:meta: 695 vs 694; check:doc-counts: same). Synced the
three stragglers to 695. (SAFETY line 89 keeps its literal "(#694)" — that is a
PR reference, not a count.)

Verified: check:doc-counts ✓ "695 = 695 #[test] functions"; check:meta ✓ 695.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
Preview — 9e3a6394 Deployed Jun 22, 2026 by vercel[bot]
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