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

Track base reward rate, validator-specific rates, and voting power. #41

Closed
6 tasks done
hdevalence opened this issue Sep 7, 2021 · 1 comment
Closed
6 tasks done
Labels
A-staking Area: Design and implementation of staking and delegation C-enhancement Category: an enhancement to the codebase E-medium Effort: Medium
Projects

Comments

@hdevalence
Copy link
Member

hdevalence commented Sep 7, 2021

The application needs to track the base reward rate for staking, the base exchange rate, and the derived validator-specific exchange rates. The voting power for each validator is calculated from the size of their delegation pool, and should also be recorded.

It's important that the implementation treats the reward rate as a time series, not as a constant value, since eventually the reward rate should adjust to steer staking incentives. We're not immediately ready to implement that, but if we use a constant staking rate, we might write code that assumes the staking rate is constant, and we wouldn't notice, because it would be accidentally correct. As an alternative, we could choose the staking rate based on the leading byte of the hash of the last block in each epoch. This is economically meaningless, but it's easy to implement, and it means we're forced to build code around the idea that the staking rate is variable.

The details are in the staking section of the protocol spec, but the high-level picture is:

base reward rate (time series) ===> base exchange rate (time series)

base reward rate (time series)
   + validator funding streams (can change, so also time series) ===> validator-specific exchange rates (time series)

base exchange rate + validator exchange rate ===> validator voting power (time series)

Subtasks:

@hdevalence hdevalence added A-staking Area: Design and implementation of staking and delegation C-enhancement Category: an enhancement to the codebase E-medium Effort: Medium labels Sep 7, 2021
@hdevalence hdevalence changed the title Track base reward rate and validator-specific rates. Track base reward rate, validator-specific rates, and voting power. Sep 7, 2021
@hdevalence hdevalence added this to the TN1 milestone Sep 8, 2021
@hdevalence hdevalence added this to Paused in MVP1 Sep 8, 2021
@hdevalence hdevalence removed this from the MVP1 milestone Sep 8, 2021
@hdevalence hdevalence removed this from Paused in MVP1 Sep 29, 2021
@hdevalence hdevalence added this to To do in MVP2 via automation Sep 29, 2021
@avahowell avahowell moved this from To do to Next in MVP2 Dec 14, 2021
@zbuc zbuc moved this from Next to In progress in MVP2 Dec 14, 2021
@avahowell
Copy link
Contributor

This is now complete

MVP2 automation moved this from In progress to Done Jan 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-staking Area: Design and implementation of staking and delegation C-enhancement Category: an enhancement to the codebase E-medium Effort: Medium
Projects
MVP2
  
Done
Development

No branches or pull requests

2 participants