fix: [IF-FINDING-002] Slashing parameters can be modified to unexpected values#1
Merged
AdriaCarrera merged 7 commits intoevmos/v0.50.11from Mar 18, 2025
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
GuillemGarciaDev
approved these changes
Mar 18, 2025
…s-sdk into fix/IF-FINDING-002
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.
[IF-FINDING-002] Slashing parameters can be modified to unexpected values
Description
In a Proof of Authority (PoA) system, validator power should remain unchanged after slashing events. If power reductions occur due to slashing, validators may end up with different staking powers, potentially violating the StakingPowerInvariant.
The Keeper Dependencies Parameters Invariant, which expects critical slashing parameters to be initialized to predefined values, does not hold. This is because the slashing parameters SlashFractionDoubleSign and SlashFractionDowntime can be modified through governance or set at genesis to unexpected values.
Problem scenarios
expected.
Recommendation
Implement restrictions on parameter changes through both governance and genesis configuration. This can be achieved by modifying the Cosmos SDK fork to prevent governance proposals from updating slashing factor parameters, and by adding genesis initialization checks that validate these values are non-zero before allowing chain startup.
Applied changes