# Proof-of-Stake inflation adjustment
- Status: proposed
- Type: protocol adjustment
- Related components:
- Start Date: 08-11-2018
- Discussion: https://github.com/peercoin/rfcs/issues/19
- Supersedes: (fill me in with a link to RFC this supersedes - if applicable)
- Superseded by: (fill me in with a link to RFC this is superseded by - if applicable)
- Author: Nagalim
## Summary
While PoS inflation can currently be up to 1% per year, in reality only a fraction of the existing coins participate in the minting process.
This RFC will seek to continuously adjust the PoS block reward such that PoS inflation approximates to 1%/year on average, no matter how much PoS participation there is.
In general, this RFC will look into the intricacies of tying a block reward to the total supply, as well as how to safely implement a fluctuating block reward.
## Conventions
- The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC 2119](http://tools.ietf.org/html/rfc2119).
- An 'Attack' is generically any action performed in an attempt to gain an unfair advantage when using the Peercoin protocol.

I will change the name of that variable because it is misleading. Still, you nearly have it right. You can get up to 5x the normal mint reward.

The total inflation rate will not max out at 1%, but will instead fluctuate around 1%. If more people start minting after it equilibrates, it will likely inflate a little more than 1% while it re-equilibrates. The inverse happens when people drop out.

How would this affect the rich get richer argument? Currently it doesn’t really apply to Peercoin because all minters can only earn the same 1% and no one can pull ahead and make more. This does have the affect of reducing incentive though. I’m just wondering what the impact would be and if Peercoin would become a larger target for this argument.

if i understand correctly, the 1% inflation will now only be reached if everybody is minting, so when we do this the inflation will be increased to about 1%, when a fraction was minting previously, only they would get 1% which would be a fraction of 1% inflation instead of full 1%

This does not affect the rich get richer argument as you are still increasing total supply and gaining a reward proportional to your holdings. So it increases the amount that “minters get richer”, but does not change the relative ownership between minters (so the rich minter makes the same % as the poor minter).

This proposal will increase inflation over the current protocol, but will target a very moderate 1% total.

It is also worth noting that with current PoS difficulty, it is very likely that we will be at maximum inflation somewhat continuously.

Now that I think about it, if you take into account the compounding interest, the equilibrium balance for case 3 (100% participation) should actually be <1. This is because the exponential increase represented by compounding interest will contribute to an acceleration of nAnnualPoSRewards that will drive nInflationAdjustment down.

You can make a much more general statement about the type of feedback loop that this proposal refers to, I’m sure.

We have moved forward a step with this: it has passed the sniff test of our devs. Most of the contentious has fallen to nAnnualPoSReward, which is where I expected it would lie. I am thinking of alternative implementations, I will enumerate some here. The first is how it is currently written.

Add up all the PoS rewards in a year.
Main Challenges: Indexing all 50k blocks within the year

Take one PoS block from the past, say 1000 blocks from the tip of the chain and multiply by 52560 blocks/year.
Main Challenges: Lack of averaging allows for manipulation and irregularities

Take the dayweight of a stake from the past, say 1000 blocks from the tip of the chain, and use it with the difficulty at that time to estimate number of coins minting. Multiply that by 0.01 to get the PoS rewards.
Main Challenges: Lack of averaging allows for manipulation and irregularities

Take method 2 or 3 and average over many blocks, possibly skipping around in the history a la stakemodifier.
Main Challenges: Averaging over 52560 blocks in the past year approximately converges method 1 and 2.

In my opinion, this now requires input from someone who understands more intimately the burden imposed on nodes by indexing the PoS reward/dayweight.

There was talk of adding an additional feedback loop, such as to limit maximum rate of change of the reward to 0.001%/block, but I believe that adds a layer of complexity that can result in resonant vibrations of the money supply, such that there are standing waves in the block rewards year to year.

Bumping up this thread as I saw this RFC just recently. I posted this on Github a few days ago, but it should better be discussed here.
We all wish that minting participation would be higher, but in my opinion this proposal is not the right way to do it. It introduces a dynamic reward, which can ultimately lead to oscillation cycles in PoS rewards, which I want to explain here:

Lets assume that some minters halt minting for speculative reasons, i.e. they expect the reward to increase. They produce a self-fulfilling prophecy, as their behaviour in fact increases the reward. When the expected top of the minting reward is reached, they will resume minting. If a significant number of minters behave like that, minting participation will be negatively impacted. The situation can exacerbate by itself, as honest minters would be punished by receiving lower average rewards.
It can lead to oscillation, particularly because minters who don’t find a block on a reward peak can again halt minting and resume minting on the next peak. They will only miss out on a negligible compound interest.

In the end, the blockchain could be less secure because minting participation could temporarily drop to a lower level than what it is now. And we would pay for less security with higher inflation, a lose-lose situation

Lets think of a solution that encourages minting, but does not introduce feedback loops.

You are describing a timing attack, which is one of the drawbacks listed. While this may be a viable strategy on a very short term basis (i.e. skipping one or two mint windows based on the expiration from the yearly reward of a large stake a year ago) you are betting on the unpredictable actions of other minters. When you withhold your block, this increases the incentive for the other minters to not withhold theirs, and to essentially take the mint rewards that you, the speculator, left on the table. You claim that the compounding interest is trivial, but so is the impact a single withheld block would have on the inflation rate (as it is averaged over a year of rewards).

As a series of test cases, let’s begin by assuming that you are the only minter on the network. You absolutely cannot increase your reward by withholding any blocks, this should be clear. As long as you mint at least 20% of the coin supply, you will get your 1%/year reward, regardless of whether you withhold or not. Next, let’s assume there is one other person in the network that controls 50% of the coins, while you control 50%. I hope you can see that you are in competition with this person, and it is always in your best interest to take your chance to mint every time, otherwise that other person will take their chance and will gain a small bit of reward over you. If you withhold blocks and they do not, you will necessarily gain less than your 0.5%/year while they gain more than their 0.5%/year. Add more actors, and this concept remains true if we assume they are all rational. Any speculation to be had is in the assumption that other actors are not acting rationally and not continuously minting. If anything, it actually works opposite to the way you have claimed, and this feedback loop dampens the oscillation cycles in PoS difficulty.

There is an assumption here, that maybe we should list as a drawback. If a minter holds a large % of peercoin in a single output (say 5% of the supply), and there is >20% participation in minting, they could withhold their block until the reward goes up (based on random chance) and mint that huge output in a single block to gain the bigger reward before the algorithm can adjust (which it does immediately following this block). This is somewhat contrived, but I admit it is possible. It may be possible to fix this by calculating the nInflationAdjustment including the current block, but that may be difficult to achieve in a succinct manner (it may require recursive calculation).