-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
R4R: Validator Commission Model #2365
Conversation
x/stake/types/validator.go
Outdated
Commission sdk.Dec `json:"commission"` // the commission rate charged to delegators | ||
CommissionMax sdk.Dec `json:"commission_max"` // maximum commission rate which validator can ever charge | ||
CommissionMaxChangeRate sdk.Dec `json:"commission_max_change_rate"` // maximum daily increase of the validator commission | ||
CommissionChangeToday sdk.Dec `json:"commission_change_today"` // total commission rate change today (reset each day) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this variable is necessary. You can just limit a validator to one change every 24 hours, and when they do change validate its within the max change rate. You don't need to store the last delta change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was informed by @rigelrozanski that we would allow multiple changes a day as long as those changes are within the constraints of CommissionMaxChangeRate
. Also, CommissionChangeToday
is not new.
Are you suggesting we change and simplify the spec? This would things much easier to track.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'll go with this approach for now that you're suggesting @ValarDragon -- I'll amend if @rigelrozanski suggests otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Lets make a follow-up issue tagged postlaunch then
I have the PoV atm that lets table implementing convenience changes like that to postlaunch. (It is a good idea, but unnecessary atm)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great suggestion - One change per day sounds fine if it will simplify the codebase :) - however we will of course still need to keep track of when the last change was made to check against - good improvement idea val!
Codecov Report
@@ Coverage Diff @@
## develop #2365 +/- ##
===========================================
+ Coverage 64.77% 64.79% +0.02%
===========================================
Files 137 137
Lines 8469 8494 +25
===========================================
+ Hits 5486 5504 +18
- Misses 2620 2625 +5
- Partials 363 365 +2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work! - few suggestions herein
@ValarDragon and @rigelrozanski address your comments 👍 |
dopeness |
Implement validator commission model:
Commission
as a first class citizen typecreate-validator
andedit-validator
CLI commands.closes: #1672
ref: #2236
Targeted PR against correct branch (see CONTRIBUTING.md)
Linked to github-issue with discussion and accepted design OR link to spec that describes this work.
Wrote tests
Updated relevant documentation (
docs/
)Added entries in
PENDING.md
with issue #rereviewed
Files changed
in the github PR explorerFor Admin Use: