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
Next

Addressing the linear growth of the reward rate

  • Loading branch information
Freydal committed Jul 24, 2019
commit 022ffdb54ab98f8816575d5e2c93465f2dd56105
@@ -406,7 +406,7 @@ contract ValidatorRegistry {
} else {
if (listing.rewardRate > 0) {
uint rewardRate = uint(listing.rewardRate);
_maxGenerationSum = _maxGenerationSum.add(rewardRate.mul(rewardRate));
_maxGenerationSum = _maxGenerationSum.add(rewardRate);
}

listing.lastRewardBlock = block.number;
@@ -555,7 +555,7 @@ contract ValidatorRegistry {
function removeListing(Listing storage l) internal {
if (l.rewardRate > 0 && l.confirmationBlock > 0) {
uint rewardRate = uint(l.rewardRate);
_maxGenerationSum = _maxGenerationSum.sub(rewardRate.mul(rewardRate));
_maxGenerationSum = _maxGenerationSum.sub(rewardRate);
}

bytes32[] memory data = new bytes32[](1);
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.