Skip to content

core: Fix double-sign external slash denominator to use snapshot self-stake - #5050

Merged
Frozen merged 2 commits into
devfrom
fix/b03
Jun 15, 2026
Merged

core: Fix double-sign external slash denominator to use snapshot self-stake#5050
Frozen merged 2 commits into
devfrom
fix/b03

Conversation

@GheisMohammadi

Copy link
Copy Markdown
Collaborator

Double-sign slashing already takes validator self-slash debt and total stake from the epoch snapshot, but the external delegator denominator was built by subtracting the validator’s live self-delegation from snapshot total stake. A validator could add self-stake after the snapshot and before slash settlement without increasing their own slash debt, while shrinking the external denominator and pushing disproportionate losses onto outside delegators (and inflating the slash beneficiary payout when those debts are capped to available balances).

This change aligns the denominator with the snapshot: totalExternalStake is computed as snapshot total stake minus snapshot self-stake, matching the snapshot amounts used in makeSlashList and in each external delegator’s slash share. Validator slashing still runs against current delegations so balances and undelegations reflect live state; only the proportional split for externals is corrected.

@GheisMohammadi GheisMohammadi self-assigned this May 28, 2026
@GheisMohammadi GheisMohammadi added the core Core Protocol label May 28, 2026
@GheisMohammadi
GheisMohammadi marked this pull request as draft May 28, 2026 14:21
@GheisMohammadi
GheisMohammadi marked this pull request as ready for review June 3, 2026 17:44
@Frozen

Frozen commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

@copilot resolve the merge conflicts in this pull request

# Conflicts:
#	internal/params/config.go

Copilot AI commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Merge conflicts resolved in commit 4e8a32d. The only conflict was in internal/params/config.go — both SlashExternalStakeDenomFixEpoch (this PR) and RejectDuplicateSlashEvidenceEpoch (from dev) are now included in all chain configs and the struct definition.

Copilot AI requested a review from Frozen June 15, 2026 21:32
@Frozen
Frozen merged commit f9f3561 into dev Jun 15, 2026
10 of 11 checks passed
@Frozen
Frozen deleted the fix/b03 branch June 15, 2026 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core Protocol

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants