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

Flexible Inflation #89

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

kianenigma
Copy link
Contributor

No description provided.

as proposed in the JAM grayparper.

Within the scope of this RFC, we suggest deploying the new inflation pallet in a backwards
compatible way, such that the inflation model does not change in practice, and leave the actual
Copy link

Choose a reason for hiding this comment

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

Does this mean pallet-inflation would still take into account parachain slots for the inflation calculation? Since crowdloans are deprecated and core time in, I am wondering the relevancy of current logic (i.e. we might hit the saturation point of 60 slots pretty easily). May be we can push a sensible (and conservative) change in the first iteration itself?

Copy link

Choose a reason for hiding this comment

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

We are parameterizing the ideal staking rate already which makes sense 👍.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It could take the auctions into account, but that is not correct anymore.

What I propose is to also alter the existing inflation rate to a fixed idea rate (eg. 75%), no longer taking the auctions into account.

My wording here is confusing, I will correct it.

portion of inflation directly into a key-less account controlled by `pallet_staking`. At the end
each era, `pallet_staking` will inspect this account, and move whatever amount is paid out into it
to another key-less account associated withe era number. The actual payouts, initiated by stakers,
will transfer from this era account into the corresponding stakers' account.
Copy link

Choose a reason for hiding this comment

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

What would happen if some era rewards go unclaimed (for more than 84 eras)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

pallet-staking removes all era points of an era n once 84 eras have been passed. It should similarly burn any funds that are left in the pot account of era n. I believe the WIP implementation should already be doing that.

Co-authored-by: Ankan <10196091+Ank4n@users.noreply.github.com>
text/0089-flexible-inflation.md Outdated Show resolved Hide resolved
text/0089-flexible-inflation.md Outdated Show resolved Hide resolved
text/0089-flexible-inflation.md Outdated Show resolved Hide resolved
Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com>
kianenigma and others added 2 commits May 8, 2024 09:21
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
Copy link

@acatangiu acatangiu left a comment

Choose a reason for hiding this comment

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

nice!

@Tomen
Copy link

Tomen commented May 23, 2024

thank you for the proactive approach!

  1. the basic concept looks good. The details go into the option of having a fixed inflation rate opposed to a fixed rate inflation rate. I would suggest to also reflect this optionality in the earlier parts of the RFC, as it might be part of the ongoing debate and should be made clear to the shallow reader.

  2. If I read the RFC correctly, it opens two essential angles: Configuring via OpenGov and making future code changes easier to implement. This is very elegant and could be reflected in the early parts of the RFC. The ability to code alternative inflation rates makes it for example possible to build an emitting function that makes the inflation rate dependent on the current issuance and a targeted supply. I understand that the RFC is unopinionated, just pointing out how it can relate to current discussions by showing future paths of integration.

  3. Discussing the drawbacks of potential over-engineering, I would suggest to discuss in the RFC how it would potentially be called from OpenGov. This makes it easier to deliberate on this. As an example of what would be plausible scenario for configuration:

What Gov wants:

  • Inflation
    • Mint 100m per annum
  • Distribution
    • Send 10m to the Treasury
    • Send 10% to account A
    • Send 30% to account B
    • Send 1m to account C
    • Send 5m to account D
    • Of the remainder
      • Send 50% to account E
    • Burn the Remainder

How could the extrinsic for it look like?

I think if we start from the extrinsic, we can deliberate if the feature set is matching this wish or not

@kianenigma
Copy link
Contributor Author

Thank you for your comment @Tomen!

On points 1 and 2, the RFC implementation will indeed open many many doors. I did not mention a lot of them to keep the text concise, but I will advertise the possibilities more in the introductory sections.

In general, the exercise that we should do is for community members and stakeholders to propose a written description of what they wish to see, and I will showcase an example of what hte code for it would look like in this RFC. You have already done this in your comment, and I will get to it next:

What Gov wants:

Inflation
Mint 100m per annum

Distribution
Send 10m to the Treasury
Send 10% to account A
Send 30% to account B
Send 1m to account C
Send 5m to account D
Of the remainder
Send 50% to account E

Burn the Remainder

Before doing this exercise in your example, I want to ask you:

What do you mean here by 10% or 30%? 10% of whatever is left of the 100m at this point, or 10% of the total?

In general, the rule of thumb with making such things configurable via governance is that it is easy to express a value to be parameterized over governance. For example, the value 100m or the value 10%. But, it is harder to express a function in a parameterize-able way. For example, in your example, the overall inflation function is:

fn inflation(total): 
    pay(10%, T)
    pay(10%, A)
    pay(30%, B)
    pay(1m, C)
    burn
    ...

It is quite easy to tweak the 10%, 1m, A, B or T in this function. But, redefining the function itself (the order of pay, burn and such) is a bit harder.

At the moment, my RFC mainly focused on having a fixed function defined in the runtime code (upgrade-able via code upgrade) tweak-able values (upgrade-able via any governance means). It is possible to add some degree of parameterization to the function part as well. But, it is worth asking if that is needed or not as it would be another possibly over-engineered aspect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants