Skip to content
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

Addressing the linear growth of the reward rate #184

Merged

Conversation

@Freydal
Copy link
Contributor

Freydal commented Jul 24, 2019

Overview

Some time ago I realized the growth of the reward rate was linear. Reviewing some of the bonding info I decided it bothered me enough to be addressed.

Description

Testing instructions

Types of changes

  • Refactor/enhancement
  • Bug fix/behavior correction
  • New feature
  • Breaking change
  • Other, additional

Notes

Status

  • Prefix PR title with [WIP] if necessary (changes not yet made).
  • Add tests to cover changes as needed.
  • Update documentation/changelog as needed.
  • Verify all tests run correctly in CI and pass.
  • Ready for review/merge.
Freydal added 4 commits Jul 24, 2019
…r-reward-growth
@Freydal

This comment has been minimized.

Copy link
Contributor Author

Freydal commented Jul 25, 2019

I struggled with this for quite a while. I tried several methods of calculating the sqrt of the correctly. I finally thought to look at it a different way which is what it took for me to realize why my results were off.

Below is the results of 2 ether ^ 2 and 2 ether ^ 2 + 1.
image

The minimum for any whole number increase in the root would be greater than the maximum reward rate. This error may have contributed to the linear calculation that preceded it. I chose to simply add the root to the maximum for the time being. I think this was a temporary means of handling this calculation, but regardless this exercise was useful in opening my eyes to the calculation and dealing with numbers of this magnitude.

…r-reward-growth
@hrharder

This comment has been minimized.

Copy link
Member

hrharder commented Jul 26, 2019

Well sorry it's been such a headache.... I think the way you have it implemented now makes sense (at least for now) adding the sqrt of each new reward rate to the _maxGenerationSum.

Do you think this is ready to merge or are you still expanding/testing?

@Freydal

This comment has been minimized.

Copy link
Contributor Author

Freydal commented Jul 26, 2019

I think it can be merged now.

@hrharder hrharder merged commit b02eda2 into master Jul 26, 2019
1 check passed
1 check passed
continuous-integration/drone/pr Build is passing
Details
@hrharder hrharder deleted the system-contracts/refactor/addressing-linear-reward-growth branch Jul 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.