When creating a continuous fund with MsgCreateContinuousFund, all recipients with valid continuous fund allocation (in percentage terms) are validated to ensure the sum of new and existing distribution percentages does not exceed 100%.

https://github.com/cosmos/cosmos-sdk/blob/439f2f9d5b5884bc9df4b58d702555330549a898/x/protocolpool/keeper/msg_server.go#L121-L134

The RecipientFundPercentage state records the reward percentage allocated to a user. For example, Alice have an allocation of 10% and Bob have an allocation of 20%. When a reward of 1000 tokens are to be distributed, Alice will receive 100 tokens while Bob receives 200 tokens.

The issue occurs when canceling an existing continuous fund, MsgCancelContinuousFund does not remove the recipient’s address entry from the RecipientFundPercentage state.

This is incorrect because if a recipient is removed from continuous fund, they should not be able to receive future fund distributions.

https://github.com/cosmos/cosmos-sdk/blob/439f2f9d5b5884bc9df4b58d702555330549a898/x/protocolpool/keeper/msg_server.go#L173

Using the above example, if Alice is removed from the fund distribution, she should not be able to receive funds. Since the RecipientFundPercentage state is not removed, the reward will still be accrued to Alice’s account.

While Alice cannot withdraw the accrued rewards due to the validation in MsgWithdrawContinuousFund, a denial of service issue would occur in MsgCreateContinuousFund as the removed recipient’s allocation percentage still contributes to RecipientFundPercentage, causing a permanent denial of service issue and preventing new continuous funds to be created.

To fix this, consider removing the recipient’s key entry in the RecipientFundPercentage state during MsgCancelContinuousFund.

Fix PR: https://github.com/cosmos/cosmos-sdk/pull/20625