Describe The Bug
In distribution module, delegator's withdraw Account can be empty
when the event like unbonding or redelegation happen, rewarding coins will be burn.
In other words, Adversary can burn coins by a malicious transaction without the signature of coin's creator.
Code Snippets
validateBasic of setWithdrawAccount hasn't be implemented.
malicious transactions with empty withdrawAccount will be preformed normally.
setWithdrawAccount structs look like this
type MsgSetWithdrawAccountIdData struct {
DelegatorAccountid chainType.AccountID
WithdrawAccountid chainType.AccountID
}
Input/Output
-
input command line like this:
./build/ktscli tx kudistribution set-withdraw kratos --keyring-backend test --chain-id testing --home ./testing/cli/ --from kratos
-
output a normally successful response
To Reproduce
- found
func GetCmdSetWithdrawAddr(cdc *codec.Codec) *cobra.Command { in x/distribution/client/cli.go
modify cobra.ExactArgs(2) into cobra.ExactArgs(1)
modify withdrawAccId, err := chainType.NewAccountIDFromStr(args[0]) into
withdrawAccId, err := chainType.NewAccountIDFromStr("")
2.remake ktscli
3.run command like this ./build/ktscli tx kudistribution set-withdraw kratos --keyring-backend test --chain-id testing --home ./testing/cli/ --from kratos
and we can see the normal response.

- finally check your withdraw addr with command
./build/ktscli query kudistribution whithdraw-addr kratos

as above, we set the withdrawAddr to empty.
Expected Behavior
kratos need intact ValidateBasic function which be called in the AnteHandler for distribution module
Desktop
- OS: MacOS catalina 10.15.
Additional Context
the difference between issue#14 to issue#15 is that there wasn't any implementation of ValidateBasic for distribution in issue#15 at all.
Contact Information
congfei.li@chaitin.com
Describe The Bug
In distribution module, delegator's withdraw Account can be empty
when the event like unbonding or redelegation happen, rewarding coins will be burn.
In other words, Adversary can burn coins by a malicious transaction without the signature of coin's creator.
Code Snippets
validateBasic of
setWithdrawAccounthasn't be implemented.malicious transactions with empty withdrawAccount will be preformed normally.
setWithdrawAccount structs look like this
Input/Output
input command line like this:
./build/ktscli tx kudistribution set-withdraw kratos --keyring-backend test --chain-id testing --home ./testing/cli/ --from kratosoutput a normally successful response
To Reproduce
func GetCmdSetWithdrawAddr(cdc *codec.Codec) *cobra.Command {in x/distribution/client/cli.gomodify
cobra.ExactArgs(2)intocobra.ExactArgs(1)modify
withdrawAccId, err := chainType.NewAccountIDFromStr(args[0])intowithdrawAccId, err := chainType.NewAccountIDFromStr("")2.remake ktscli
3.run command like this

./build/ktscli tx kudistribution set-withdraw kratos --keyring-backend test --chain-id testing --home ./testing/cli/ --from kratosand we can see the normal response.
./build/ktscli query kudistribution whithdraw-addr kratosas above, we set the withdrawAddr to empty.
Expected Behavior
kratos need intact ValidateBasic function which be called in the AnteHandler for distribution module
Desktop
Additional Context
the difference between issue#14 to issue#15 is that there wasn't any implementation of ValidateBasic for distribution in issue#15 at all.
Contact Information
congfei.li@chaitin.com