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

Clarify inflation system calculation details #230

Merged
merged 1 commit into from
Aug 5, 2022
Merged

Conversation

cwgoes
Copy link
Collaborator

@cwgoes cwgoes commented Jul 28, 2022

This PR updates the inflation system section of the Namada specs to clarify PD-controller calculation details.

For simplicity, I think we can just use fully separate PD-controllers for each asset in the shielded pool for which Namada decides to pay rewards. This requires that we pick parameters and caps independently, but otherwise we have to deal with contention between controllers, which is complicated and likely confusing to users, so I think it's worth the additional parameters.

Also for simplicity, I'm assuming that we do all inflation calculations once-per-epoch and quantise the PD-controllers at that frequency.

Copy link
Member

@adrianbrink adrianbrink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and massively simplifies things.

- $R_{PGF}$ is the public goods funding reward rate, in units of percent per annum
- $R_{PoS-Target}$ is the target staking ratio (genesis default 2/3)
- $R_{SP-A-Target}$ is the target amount of asset $A$ locked in the shielded pool (separate value for each asset $A$)
- $EpochsPerYear$ is the number of epochs per year (genesis default 365)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we currently have these params

pub struct EpochDuration {

Should we use min_duration to estimate EpochsPerYear? We should probably make sure that min_duration > min_num_of_blocks * consensus_timeout_commit generously enough so that we're not waiting for blocks to switch epoch

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we should use min_duration to estimate EpochsPerYear (but the latter should still be constant)

Copy link
Member

@tzemanovic tzemanovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Let's add some issues for the implementation after this. I think we'll first need to add:

  • the total supply to the token VP to avoid iteration (the VP can simply reject any changes to it in a transaction as only the protocol can mint tokens)
  • total PoS locked tokens - we currently only have total voting power, which is lossy conversion from tokens

@cwgoes cwgoes merged commit 6171efd into main Aug 5, 2022
@cwgoes cwgoes deleted the cwgoes/more-specs-work branch August 5, 2022 11:30
phy-chain pushed a commit to phy-chain/namada that referenced this pull request Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants