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

staking: reverse causality of rate calculations #1481

Closed
hdevalence opened this issue Sep 25, 2022 · 3 comments
Closed

staking: reverse causality of rate calculations #1481

hdevalence opened this issue Sep 25, 2022 · 3 comments
Assignees

Comments

@hdevalence
Copy link
Member

Is your feature request related to a problem? Please describe.

Currently, the staking rate calculations are derived from the code that was originally used just to build the exchange rate mechanism and test that it works. As a result, the flow of causality is roughly: fixed base ratevalidator exchange rate → (implicitly) change to size of validators' delegation pool.

However, this isn't what we actually want: we want to take the amount of new issuance for a delegation pool as the given input, then compute the validator exchange rate that prices in that change to the delegation pool. This way, we can split apart two responsibilities: (1) the overall tokenomics for staking, which determines the new issuance for each delegation pool [i.e., some new code] and (2) the mechanism that actually does the accounting to track changes to the pool size [i.e., the validator rate mechanism]

For instance, this allows us to implement #1450, because we can (a) compute the new staking issuance for each delegation pool and then (b) add in the fees collected by that validator before (c) computing a validator exchange rate that prices in a+b.

It will also allow us to implement variable staking rewards, or variable splits of newly issued tokens between stakers or other streams, since those just change the "top" of the pipe.

Describe the solution you'd like

  • Create a new piece of code that determines the new staking issuance for each validator's delegation pool at the end of the epoch (to start, this can use a fixed inflation rate, like we do currently);
  • Refactor the validator exchange rate computations introduced in staking: refactor and clean up staking rate calculations #1480 to take an amount of new issuance as the input, and the validator exchange rate as the output.
@hdevalence
Copy link
Member Author

The new piece of code could be called "distributions", along the lines of the Cosmos SDK's distributions module.

@zbuc zbuc added this to Testnets Oct 21, 2022
@zbuc zbuc moved this to Future in Testnets Oct 21, 2022
@plaidfinch plaidfinch moved this from Future to Todo in Testnets Oct 28, 2022
@erwanor erwanor moved this from Todo to Future in Testnets Nov 11, 2022
@avahowell avahowell assigned plaidfinch and avahowell and unassigned erwanor Mar 10, 2023
@avahowell avahowell moved this from Future to Testnet 49: Pasiphae in Testnets Mar 10, 2023
@hdevalence hdevalence moved this from Testnet 49: Pasiphae to Future in Testnets Mar 16, 2023
@hdevalence hdevalence moved this from Future to Next in Testnets Mar 24, 2023
@erwanor erwanor moved this from Next to Future in Testnets Apr 24, 2023
@conorsch conorsch moved this from Future to In Progress (Already claimed) in Testnets Sep 8, 2023
@conorsch conorsch assigned erwanor and unassigned plaidfinch and avahowell Oct 13, 2023
@conorsch conorsch moved this from In Progress (Already claimed) to Next in Testnets Oct 13, 2023
@conorsch
Copy link
Contributor

Kicking back to Next, and unassigning @plaidfinch. Optimistically, @erwanor will pick this up for 64.

@aubrika aubrika moved this from Next to Testnet 64: Titan in Testnets Oct 18, 2023
@aubrika aubrika added this to Penumbra Oct 30, 2023
@github-project-automation github-project-automation bot moved this to 🗄️ Backlog in Penumbra Oct 30, 2023
@aubrika aubrika moved this from 🗄️ Backlog to 📝 Todo in Penumbra Oct 30, 2023
@erwanor erwanor self-assigned this Nov 14, 2023
@erwanor erwanor changed the title Reverse causality of staking rate calculations staking: reverse causality of rate calculations Nov 15, 2023
@aubrika aubrika moved this from 📝 Todo to 🗄️ Backlog in Penumbra Nov 16, 2023
@erwanor erwanor moved this from 🗄️ Backlog to ✅ Done in Penumbra Nov 30, 2023
@erwanor
Copy link
Member

erwanor commented Nov 30, 2023

The causality reversal is completed in #3415. The refactor and clean-up are tracked in #1480.

@erwanor erwanor closed this as completed Nov 30, 2023
@github-project-automation github-project-automation bot moved this from Testnet 64: Titan to Testnet 63: Rhea (Web Wallet) in Testnets Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Status: Testnet 63: Rhea (Web Wallet)
Development

Successfully merging a pull request may close this issue.

5 participants