-
Notifications
You must be signed in to change notification settings - Fork 993
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
Conversation
There was a problem hiding this 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) |
There was a problem hiding this comment.
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
namada/shared/src/ledger/parameters/mod.rs
Line 141 in 9587152
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
There was a problem hiding this comment.
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)
There was a problem hiding this 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
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.