feat: bond refunds in Succeeded/Queued - #22
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
BondRuleset.resolveBondnow refunds the proposer inSucceeded/Queuedinstead of reverting; onlyPending/Activerevert. Still permissionless, still one-shot — no new function, error, or event.Defeatedis unreachable fromSucceeded.Changes
src/rulesets/BondRuleset.sol— refund branch forSucceeded/Queuedin_bondResolution; NatSpec updated (header,resolveBond,_bondResolution).test/governor/GovernorNexus.bond.t.sol—test_resolve_revertsWhileQueuedflipped totest_resolve_refundsWhileQueued; new pins: refund atSucceeded, 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.bondConservation,noDoubleSettlehold over the wider resolvable set).Verification
forge test); the 3 fork tests fail only on RPC infra (free-plan timeout at eth.drpc.org), unrelated to this change.forge fmt --checkclean.Succeeded/Queuedback 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 indocs/specs/2026-07-22-nexus8-bond-ruleset.md(local —docs/is gitignored).🤖 Generated with Claude Code