Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect Coins comparison allows decreasing sequencer bonds below the configured minimum #1255

Closed
Tracked by #1055
danwt opened this issue Sep 25, 2024 · 1 comment
Assignees
Labels

Comments

@danwt
Copy link
Contributor

danwt commented Sep 25, 2024

The MsgDecreaseBond message allows sequencer callers to schedule the withdrawal of part of their bond, enforcing a limitation in x/sequencer/keeper/msg_server_decrease_bond.go:36 on the amount requested that disallows sequencers to hold less than the configured MinBond.
Within this check, an incorrect condition based on the IsAllLT function of the Coins structure does not properly account for the case where the sequencer holds tokens in denominations other than that of the MinBond.
A sequencer can exploit this by increasing its bond with any token other than the MinBond denomination to decrease its bond below MinBond.
Consequently, the sequencer would be able to be the proposer even if its bond is less than the required MinBond.
Recommendation
We recommend simplifying the MinBond requirement to check the remaining bond in the MinBond denomination only instead of a full iteration on all denominations.

@danwt
Copy link
Contributor Author

danwt commented Nov 3, 2024

killed by #1328

@danwt danwt closed this as completed Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants