dymension-rdk icon indicating copy to clipboard operation
dymension-rdk copied to clipboard

Update the `distribution` module params

Open mtsitrin opened this issue 1 year ago • 6 comments

Currently we inherint the cosmos-sdk proto and all defined params

// Params defines the set of params for the distribution module.
type Params struct {
	CommunityTax        github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=community_tax,json=communityTax,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"community_tax"`
	BaseProposerReward  github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=base_proposer_reward,json=baseProposerReward,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"base_proposer_reward"`
	BonusProposerReward github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=bonus_proposer_reward,json=bonusProposerReward,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"bonus_proposer_reward"`
	WithdrawAddrEnabled bool                                   `protobuf:"varint,4,opt,name=withdraw_addr_enabled,json=withdrawAddrEnabled,proto3" json:"withdraw_addr_enabled,omitempty"`
}

We should clean it up and leave only the params required for a rollapp (e.g proposer reward, staking reward, community)

mtsitrin avatar Jun 04 '23 09:06 mtsitrin

@shaolin-flow @yishay-dym pls review If u have suggestion for how the distribution params should look like

mtsitrin avatar Jun 18 '23 12:06 mtsitrin

@mtsitrin I'm not sure i'm following the need for string stakers_reward = 3. Since reducing the proposer-reward and community-tax nets to the stakers-reward. Is this field necessary?

shaolin-flow avatar Jul 16 '23 14:07 shaolin-flow

mathematically it not needed, but I guess it's better for clarity

we can set 2 and the 3rd is derived or we can set 3 and validate it all sums to 1

your call

mtsitrin avatar Jul 18 '23 08:07 mtsitrin

I see, it's fine to leave it and validate the total.

shaolin-flow avatar Jul 26 '23 13:07 shaolin-flow

@omritoptix IMO too much effort for now

It can't be easily wrapped so changing the proto files requires us to copy most of the original code instead of just referencing to the original module

mtsitrin avatar Aug 22 '23 10:08 mtsitrin

ok. let's put it as a technical debt for now.

omritoptix avatar Sep 10 '23 15:09 omritoptix