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

Change staking system to do fixed issuance per block #3409

Closed
3 tasks
hdevalence opened this issue Nov 17, 2023 · 1 comment
Closed
3 tasks

Change staking system to do fixed issuance per block #3409

hdevalence opened this issue Nov 17, 2023 · 1 comment
Assignees

Comments

@hdevalence
Copy link
Member

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

As part of #3398 @erwanor and I cleaned up some of the staking rates implementation. The next step is to reverse the direction of the base rate computation, so that the rates are determined by issuance rather than vice versa.

To do this, we should pick the simplest possible issuance formula, then implement it in the distributions component. This gets the structure right, and then we can port the logic from the Cosmos SDK for computing the issuance later.

Describe the solution you'd like

  • Add chain parameters to distributions component, initially with one parameter, staking_issuance_per_block. Set this to 1penumbra. (This is enough to be measurable but probably not enough to really mess up the testnet if it's wrong).
  • Add end-epoch logic to distributions component that computes the staking issuance as num_blocks * staking_issuance_per_block and writes this in a way the staking component can read.
  • Change the staking component to read the issuance in its end-epoch logic and use the formulas in Reverse staking rate calculations #2909 to compute the next_base_rate from the new issuance and the prev_base_rate.

Additional context

Later, we can port over the PID controller from the Cosmos SDK.

@erwanor
Copy link
Member

erwanor commented Nov 30, 2023

This is done in #3413 and #3415. Next steps are to implement a simple controller that performs issuance based on an inflation window and a target amount of bonded stake, similar to what the Cosmos SDK does in x/mint.

@erwanor erwanor closed this as completed Nov 30, 2023
@github-project-automation github-project-automation bot moved this from In Progress (Already claimed) to Testnet 63: Rhea (Web Wallet) in Testnets Nov 30, 2023
@erwanor erwanor moved this from Testnet 63: Rhea (Web Wallet) to Testnet 64: Titan in Testnets Nov 30, 2023
@erwanor erwanor added this to Penumbra Nov 30, 2023
@erwanor erwanor moved this to ✅ Done in Penumbra 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 64: Titan
Development

No branches or pull requests

2 participants