feat: Remove multistaking token proposal - #153
Conversation
hieuvubk
commented
Sep 15, 2025
- Add a proposal for removing multistaking token
- How it affect to current validators and delegations of that token:
- Get all delegations of multistaking token will remove
- Force undelegate all delegation and remove bond denom,
- Since token was removed and all delegation was removed from validators, they will be jailed immediately.
- After unbonding period, locked token will be transfered back to user. Validator will be removed from store.
jiujiteiro
left a comment
There was a problem hiding this comment.
looks good. can you please update docs in /spec/02_gov.md?
| _, found := k.GetBondWeight(ctx, p.Denom) | ||
| if !found { | ||
| return fmt.Errorf("Error MultiStakingCoin %s not found", p.Denom) //nolint:stylecheck | ||
| } |
There was a problem hiding this comment.
If bond weight is 0 before this happens, would this work or throw an error here?
There was a problem hiding this comment.
We don’t accept zero weight anymore
There was a problem hiding this comment.
I think we should still be able to handle that scenario though
There was a problem hiding this comment.
what u think we should do with zero weight then?
There was a problem hiding this comment.
anw the scenario that weight is zero can not happen since we block it in AddMultiStakingCoinProposal and UpdateBondWeightProposal also.
There must be 2 state of a denom, non-zero or be removed.
| return fmt.Errorf("Error MultiStakingCoin %s not found", p.Denom) //nolint:stylecheck | ||
| } | ||
|
|
||
| msgServer := NewMsgServerImpl(k) |
There was a problem hiding this comment.
It would make more sense to me to make this function, call an internal keeper.Undelegate function, than a keeper method creating a MsgServer instance that calls the keeper internally.
There was a problem hiding this comment.
we can not call keeper.Undelegate func since Undelegate is msgServer implementation
There was a problem hiding this comment.
What I meant is to take the logic within MsgServer.Undelegate and create a new Kepper.Undelegate method that does everything there. And call that method from within MsgServer.Undelegate instead
There was a problem hiding this comment.
it break msg_server.go a lot since Undelegate, Delegate,... they all are MsgServer funcs for now. I can wrap the for loop for 1 func like ForceUndelegateFromDenom or st
There was a problem hiding this comment.
I added an alternative implementation. Take a look to see what you think