# Rewards and maturity

## Overview

Stakeholders gain voting power and can earn voting rewards by staking their ICP tokens in neurons and participating in governance.

The Internet Computer is a decentralized platform whose evolution is decided by its stakeholders through voting. This means decisions impacting the future of the Internet Computer are made by people vested in the outcome. In return for participation in governance, ICP provides voting rewards. Voters can vote actively, or they can use a form of liquid democracy to automatically follow other voters.

Voting rewards are an important aspect of neurons and can be compounded to increase your total voting power. So to better understand staking and reward, it may be helpful to look at staking from two perspectives:

### Long-term: voting rewards over years

The voting reward function is depicted in this curve: https://dashboard.internetcomputer.org/circulation

In the first year, the NNS allocates 10% of the total supply to generate
voting rewards. Note the term "allocates" rather than "mints", because
rewards are not minted until they are spawned and the according reward neuron is
disbursed. This allocation rate drops quadratically until it reaches 5% by year 8 after genesis.
The formula for the annualized rewards as a percentage of total supply for the first 8 years is `R(t) = 5% + 5% [(G + 8y – t)/8y]²`

.

Like all parameters in the NNS, the minting rate can be changed via NNS proposals, but this is the current rate schedule.

Because the total supply of ICP is a dynamic system with deflation and inflation, it is impossible to predict what voting rewards will be on any given day or year in the future. It is relatively easy to predict what the percentage allocation rate will be months from now, but it is much harder to predict what the total supply will be both because of potential changes to the rate, and how often stakeholders will spawn their maturity.

### Short-term: voting rewards each day

Every day, rewards are granted by the network to each voting neuron. The percentage of those rewards received by each neuron depend on the following factors:

- Amount of ICP and maturity staked.
- Length of dissolve delay.
- Age of the neuron (time spent in a non-dissolving state).
- Number of eligible proposals the neuron has voted on.

These values are combined to calculate the total voting power of a neuron. It is computed as follows:

- Only neurons with a dissolve delay of more than 6 months are eligible for voting. The maximum dissolve delay is 8 years.
- The voting power of a neuron is computed as
`neuron_stake * dissolve_delay_bonus * age_bonus`

. - In particular the dissolve delay bonus and the age bonus are cumulative.
- The neuron stake is the sum of staked ICP and staked maturity.
- The dissolve delay bonus (ddb) is a value between ddb
_{min}= 1 and ddb_{max}= 2 and a linear function of the dissolve delay (capped at eight years). - The age bonus (ab) is a value between ab
_{min}=1 and ab_{max}=1.25 and a linear function of the age of the neuron (capped at four years). A neuron starts aging when it enters a locked state. Aging is reset to 0 when a neuron enters a dissolving state. - The voting power is calculated when the proposal is made, not when the ballot is cast.

For example, if a neuron has a stake of 60 ICP and 40 staked maturity, it has a combined stake of 100.
Then, let's assume a dissolve delay of 8 years, which gives it a dissolve delay bonus of 2.
Finally, assume a neuron age of 2 years. This gives it an age bonus of 1.125.
All together, this neuron then has a voting power of `100 * 2 * 1.125 = 225`

.

The total pool of voting rewards for a given day is calculated as `ICP supply (total supply of ICP tokens on that day) * R(t) / 365.25`

.
The reward pool is then allocated in proportion to the voting power of proposals that are settled on this day multiplied by the reward weight of the according proposal category.

For example, if on a single day the NNS has generated 1000 maturity in total rewards (see below for more on how this is computed), and there were 10 proposals submitted for which only two neurons were eligible to vote on, and:

- Neuron A has a voting power of 20, and voted on all 10 proposals.
- Neuron B has a voting power of 80, and voted on all 10 proposals.

Then the 1000 maturity would be divided between these two neurons by their proportional voting power:

- Neuron A with voting power of 20, gets 20% of the total = 200 maturity.
- Neuron B with voting power of 80, gets 80% of the total = 800 maturity.

If either neuron had only voted for X% of those 10 proposals (weighted by the reward weight of the according proposal category), it's reward would be decreased to X% of its maximum eligibility.

For example, if on a single day there were 10 proposals, but a neuron only voted for five of them,
that neuron would only receive 50% of its rewards for which it is eligible that day.
If the five proposals the neuron voted on had a reward weight of two,
it would have a `weight_of_proposal_votes = 5 * 2`

, while the `weight_of_all_proposals = 5 * 2 + 5 * 1`

,
therefore it would receive `(5 * 2) / (5 * 1 + 5 * 2) = 66%`

of the rewards for which it is eligible that day.

## Spawning & maturity modulation

Voting rewards are collected by neurons in the form of maturity. As explained in the neuron overview, maturity can then either be staked or spawned.

### Background and goal

Maturity is an attribute of a neuron; it is not a tradable asset. The decentralized governance of the Internet Computer can change the treatment of maturity at any time. To generate income from maturity, a user needs to trigger a non-deterministic process, which is burning maturity to create new ICP via spawning a neuron. The maturity modulation function introduces uncertainty in the creation of tokens from maturity.

### Spawning maturity via the maturity modulation function

The user triggers spawn maturity. A new neuron will be immediately spawned; however, this newly spawned neuron will have no ICP at start, only maturity. Spawned neurons will have a dissolve delay of 7 days and will be set to dissolving at the time of spawning. After 7 days when the neuron is dissolved, the amount of ICP, modulated by the function introduced below, will be minted from the neuron's maturity and be available to the user.

### Description of the maturity modulation function

At the day of modulation, for each of the last 29 days, a 30-day moving average ICP/cycles conversion rate is determined, which is displayed on the Internet Computer dashboard. These are labeled `a1`

through `a29`

, where `a1`

denotes the average rate on the previous day, `a2`

denotes the rate 2 days ago and so on. The 30-day moving average conversion rates are used because they exhibit less variance than day-to-day conversion rates.

Then, compute the relative 7-day return for each of the last 4 weeks. Thus:

`w1 = (a1 - a8) / a8`

,`w2 = (a8 - a15) / a15`

,`w3 = (a15 - a22) / a22`

,`w4 = (a22 - a29) / a29`

.The values w1, w2, w3, and w4 are bounded from -0.05 to 0.05 by clipping values to the limits of this range, i.e., capping by 0.05 and flooring by -0.05.

Take the average

`w = (w1 + w2 + w3 + w4) / 4`

.The resulting value w is a number between -5% and 5% that determines modulation.

The maturity amount x is converted to x * (1+w) units of ICP.

The maturity modulation function is updated once a day.

### Example

On Feb 1, 2022, the modulation function is 0.73% which is the average of the relative weekly returns w1 = -4.59%, w2 =-0.63%, w3=5.00%, w4 = 3.13%. If a user disburses on that day (day of transfer) 100 maturity, then this will result in 100.73 ICP.

### Motivation and Analysis

Evidently, this process introduces a certain amount of uncertainty for the conversion from maturity to ICP. However this uncertainty is limited in two ways:

- The modulation value w is between -5% and +5%: This implies that, e.g., 100 maturity will be converted into an ICP amount in the range of 95 and 105. This kind of volatility is well in the range of daily conversion rate fluctuations of ICP.
- The modulation value w is calculated at the day of modulation as
`w = (w1+ w2+ w3 + w4) / 4`

. At the day of initiation (7 days prior), the user can already determine`(w2+ w3 + w4)/4`

. The missing value w1 can affect the modulation value at most by 1.25% (5%/4) up or down.

The modulation value can change by at most 2.5% from one week to the next, as one week drops out of the window and one week enters the calculation window.

The modulation function gives an incentive for users to disburse maturity when the ICP/Cycles conversion rate has been increasing over time and to hold back when the ICP has been decreasing recently. For example if the ICP/Cycles conversion rate was monotonically increasing, then w1, w2, w3, w4 are positive and thus also w, incentivizing users to convert a maturity amount x to x * (1+w) units of ICP.

## Inflationary and deflationary mechanisms

Deflationary mechanisms:

- Minting cycles to pay for compute and storage burns ICP to create cycles.
- Burning of transaction fees.
- Burning of the fee for failed proposals of neurons; note that this only happens at disbursement or merging of neurons, so accumulated fees can persist for a while before finally contributing to deflation.

Inflationary mechanisms:

- Node providers are paid by minting ICP.
- Voting rewards, once spawned and converted to ICP.