contracts: note that StakeCredit.slash() intentionally ignores the unbond queue - #684
contracts: note that StakeCredit.slash() intentionally ignores the unbond queue#684zlacfzy wants to merge 1 commit into
Conversation
Pull Request ReviewThis PR adds NatSpec documentation to Sensitive ContentNo sensitive content detected. Security IssuesNo serious security issues detected. Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits. |
…gation Document at the slash() site that only the validator's active self-delegation is burned and amounts recorded in the unbonding queue are outside this burn, so a zero burn is a valid outcome and slash() must not revert on it since it runs on consensus-driven paths. Comment-only; no behavior change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
5796d11 to
4f3b707
Compare
Pull Request ReviewThis PR adds NatSpec documentation to the Solidity Sensitive ContentNo sensitive content detected. Security IssuesNo serious security issues detected. Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits. |
Description
StakeCredit.slash()burns only the validator's active self-delegation (balanceOf(validator)) and does not reach the 7-day unbonding queue, so a validator that has already undelegated its self-stake is slashed 0.Rationale
This is intentional and safe: the unbonded self-stake stays locked for
unbondPeriodand is claimable only viaStakeHub.claim(gated bywhenNotPaused/notInBlackList), sostakeHubProtectorcan blacklist the operator orpause()within that window to freeze the funds.slash()must also not revert on a 0 burn, since it runs on consensus-driven paths.Changes
Add a NatSpec
@noticeatStakeCredit.slash()documenting the above, so the intent is explicit at the call site. Comment-only; no behavior change.🤖 Generated with Claude Code