Skip to content

feat: bond refunds in Succeeded/Queued - #22

Merged
LeonardoVieira1630 merged 4 commits into
devfrom
claude/nexus8-bond-early-refund
Aug 3, 2026
Merged

feat: bond refunds in Succeeded/Queued#22
LeonardoVieira1630 merged 4 commits into
devfrom
claude/nexus8-bond-early-refund

Conversation

@LeonardoVieira1630

Copy link
Copy Markdown
Member

Summary

  • BondRuleset.resolveBond now refunds the proposer in Succeeded/Queued instead of reverting; only Pending/Active revert. Still permissionless, still one-shot — no new function, error, or event.
  • Decision D64 (amends D61/D57, product decision 2026-08-03): the bond is an anti-spam instrument — surviving the vote fulfills its purpose. Accepted trade-off: the timelock-veto forfeit becomes best-effort, reaching only bonds still unsettled when the veto lands (and anyone can settle early, since resolution is permissionless). The slash-by-vote path is untouched — Defeated is unreachable from Succeeded.
  • Resolves the stranded-bond residual: a passed-but-never-executable proposal no longer locks its bond forever.

Changes

  • src/rulesets/BondRuleset.sol — refund branch for Succeeded/Queued in _bondResolution; NatSpec updated (header, resolveBond, _bondResolution).
  • test/governor/GovernorNexus.bond.t.soltest_resolve_revertsWhileQueued flipped to test_resolve_refundsWhileQueued; new pins: refund at Succeeded, third-party-triggered refund pays the proposer, early settle → execute replay reverts, early settle → council veto cannot forfeit.
  • README.md — bond section rationale updated; stranded-bond residual replaced by the veto-evasion residual.
  • Invariant suite untouched and green (bondConservation, noDoubleSettle hold over the wider resolvable set).

Verification

  • 303/303 local tests pass (forge test); the 3 fork tests fail only on RPC infra (free-plan timeout at eth.drpc.org), unrelated to this change. forge fmt --check clean.
  • Whole-branch security review confirmed: no path from Succeeded/Queued back to a slashable state; one-shot settlement holds; custody invariant unaffected; funds only ever go to the recorded proposer.

Spec: docs/superpowers/specs/2026-08-03-bond-early-refund-design.md + D64 in docs/specs/2026-07-22-nexus8-bond-ruleset.md (local — docs/ is gitignored).

🤖 Generated with Claude Code

LeonardoVieira1630 and others added 4 commits August 3, 2026 17:02
The bond is an anti-spam instrument — surviving the vote fulfills its
purpose, so the refund no longer waits for execution. The timelock-veto
forfeit becomes best-effort: it reaches only bonds still unsettled when
the veto lands. Product decision 2026-08-03 (spec D64, amends D61/D57).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Succeeded, Queued, and Executed all map to SlashReason.None; one
condition states the doctrine (refund from Succeeded onward) instead
of two branches returning the same value.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@LeonardoVieira1630 LeonardoVieira1630 self-assigned this Aug 3, 2026
@LeonardoVieira1630
LeonardoVieira1630 merged commit aaa30b3 into dev Aug 3, 2026
6 checks passed
@LeonardoVieira1630 LeonardoVieira1630 changed the title feat: bond refunds in Succeeded/Queued (D64) feat: bond refunds in Succeeded/Queued Aug 19, 2026
@LeonardoVieira1630
LeonardoVieira1630 deleted the claude/nexus8-bond-early-refund branch August 19, 2026 17:07
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