polkadot-fellows / RFCs

Proposals for change to standards administered by the Fellowship.
https://polkadot-fellows.github.io/RFCs/
Creative Commons Zero v1.0 Universal
114 stars 55 forks source link

ON HOLD: Flexible Inflation #89

Open kianenigma opened 5 months ago

kianenigma commented 5 months ago

Update July 17: Please note that this RFC for now is "on hold" until we add some basic parameterization to the relay-chain(s) as per https://github.com/polkadot-fellows/runtimes/pull/364. This PR is a small subset of this RFC. Once this work is done, we can explore this RFC again.

Tomen commented 4 months ago

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:

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 commented 4 months ago

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.