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

Update Ideal Staking rate info #5158

Merged
merged 10 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 101 additions & 0 deletions docs/learn/learn-DOT-inflation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
---
id: learn-DOT-inflation
title: DOT Inflation
filippoweb3 marked this conversation as resolved.
Show resolved Hide resolved
sidebar_label: DOT Inflation
description: Tokenomics of Polkadot's Native Token DOT.
keywords: [token, DOT, inflation]
slug: ../learn-DOT-inflation
---

import RPC from "./../../components/RPC-Connection";

{{ polkadot: DOT :polkadot }}{{ kusama: KSM :kusama }} is an inflationary token. There is no maximum
number of {{ polkadot: DOT :polkadot }}{{ kusama: KSM :kusama }}. On the
filippoweb3 marked this conversation as resolved.
Show resolved Hide resolved
{{ polkadot: Polkadot :polkadot }}{{ kusama: Kusama :kusama }} network, inflation is
{{ polkadot: [set to be 10% annually](https://github.com/paritytech/polkadot/blob/756ccc35e93d1a78e3c71a0e67ae4da5f1d09f69/runtime/polkadot/src/lib.rs#L576), :polkadot }}
{{ kusama: [set to be 10% annually](https://github.com/paritytech/polkadot/blob/756ccc35e93d1a78e3c71a0e67ae4da5f1d09f69/runtime/kusama/src/lib.rs#L535), :kusama }}
with validator rewards being a function of the amount staked and the remainder going to the
treasury.
filippoweb3 marked this conversation as resolved.
Show resolved Hide resolved

:::info

DOT went through [redenomination](./learn-redenomination.md) in 2020 that saw the DOT token supply
increase by 100 times.

The current token supply on {{ polkadot: Polkadot :polkadot }}{{ kusama: Kusama :kusama }} is
{{ polkadot: <RPC network="polkadot" path="query.balances.totalIssuance" defaultValue={12230666300429914781} filter="humanReadable"/> (Over 1.2 Billion DOT). :polkadot }}
{{ kusama: <RPC network="kusama" path="query.balances.totalIssuance" defaultValue={12619256191792480093} filter="humanReadable"/> (Over 12 Million KSM). :kusama }}

:::

According to the inflation model, this would suggest that if you do not use your
{{ polkadot: DOT :polkadot }}{{ kusama: KSM :kusama }} for staking, your tokens currently dilute
over time. **Token inflation is not a forever fixed value, and inflation can be set lower in the
future through [on-chain governance](./learn-polkadot-opengov.md).**

It is important to understand that inflation is used to incentivize network participants and to grow
the network, especially in the early phases. Ending inflation too soon could limit growth while
ending inflation too late (after the ecosystem has reached a mature stage) could dilute the value of
your currency with no further growth for the ecosystem.
{{ polkadot: Polkadot :polkadot }}{{ kusama: Kusama :kusama }} is a young network, and it is
currently in a growing stage and has yet to reach maturity.
filippoweb3 marked this conversation as resolved.
Show resolved Hide resolved

## Inflation Model

The chart below shows the inflation model of the network. Depending on the number of staked tokens,
the distribution of the inflation to validators and nominators versus the treasury will change
dynamically to provide incentives to participate (or not participate) in staking.

There is a [dynamic _ideal staking rate_](#ideal-staking-rate) (in the figure set to 0.5 or 50%)
that the network tries to maintain. The goal is to have the _system staking rate_ meet the _ideal
staking rate_. The system staking rate would be the total amount staked over the total token supply,
where the total amount staked is the stake of all validators and nominators on the network. The
ideal staking rate accounts for having sufficient backing of {{ polkadot: DOT :polkadot }}
{{ kusama: KSM :kusama }} to prevent the possible compromise of security while keeping the native
token liquid.

![staking](../assets/NPoS/staking-rate-with-parachains.png)

<p style={{textAlign:"center"}}>Source: <a href="https://w3f-research.readthedocs.io/en/latest/polkadot/overview/2-token-economics.html">Research - Web3 Foundation</a></p>

- **x-axis**: Proportion of {{ polkadot: DOT :polkadot }}{{ kusama: KSM :kusama }} staked
- **y-axis**: Inflation, annualized percentage
- **Blue line**: Annual inflation rate of NPoS, i.e. total amount of tokens minted to pay validators
and nominators.
- **Green line**: Annual rewards rate for stakers. For instance, 0.2 corresponds to 20% of annual
returns on the staked tokens. You can determine the current annual staking rewards rate by looking
at the top bar of the staking overview on
[Polkadot-JS UI](https://polkadot.js.org/apps/#/staking).

Assuming that the ideal staking rate is 50%, all of the inflation would go to the validators and
nominators if 50% of all {{ polkadot: DOT :polkadot }}{{ kusama: KSM :kusama }} are staked. Any
deviation from the 50% - positive or negative - sends the proportional remainder to the treasury.
Deviation from the ideal staking rate are referred to as _staking inefficiencies_. Thus, the
treasury does not currently receive a substantial inflow of funds at the ideal staking rate. See
[this page](./learn-polkadot-opengov-treasury.md) for more information about treasury inflow
sources.

For those who are interested in knowing more about the design of the inflation model for the
network, please see [here](https://research.web3.foundation/Polkadot/overview/token-economics).

## Ideal Staking Rate

The ideal staking rate can vary between 45% to 75% based on the number of parachains that acquired a
lease through an auction (this excludes the System parachains), based on the implementation
[here](https://github.com/paritytech/polkadot-sdk/blob/cd901764a52edc04a6d22bea3a526def593ab2a7/polkadot/runtime/common/src/impls.rs#L80).

Briefly, the ideal staking rate can be calculated as follows:

`0.75 - auction_proportion`

where `auction_proportion` is obtained by computing `min(auctioned_slots, 60) / 200`. The
`auctioned_slots` are all the auctioned slots without the slots for system parachains.

Assuming there are 48 filled slots, of which three are dedicated to system parachains (Asset Hub,
Bridge Hub and Collectives), there are 45 auctioned slots. The `auction_proportion` is thus
`45 / 200 = 0.225`. The ideal staking rate is `0.75 - 0.225 = 0.525`.

If the amount of tokens staked goes below 52.5%, then staking rewards for nominators increase,
incentivizing them to stake more tokens on the network. On the contrary, staking rewards drop if
staked tokens exceed the ideal staking rate. This results from the change in the percentage of
staking rewards that go to the Treasury.
85 changes: 0 additions & 85 deletions docs/learn/learn-staking-advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -465,91 +465,6 @@ about how to claim rewards using the Polkadot-JS UI.
4. Staking operations at the end of an era are closed to allow the off-chain validator election to
take place. See [Off-chain Phragmén](learn-phragmen.md#off-chain-phragmen) for more information.

## Inflation

{{ polkadot: DOT :polkadot }}{{ kusama: KSM :kusama }} is an inflationary token. In fact, there is
no maximum number of {{ polkadot: DOT :polkadot }}{{ kusama: KSM :kusama }}. On
{{ polkadot: Polkadot :polkadot }}{{ kusama: Kusama :kusama }} network, inflation is
{{ polkadot: [set to be 10% annually](https://github.com/paritytech/polkadot/blob/756ccc35e93d1a78e3c71a0e67ae4da5f1d09f69/runtime/polkadot/src/lib.rs#L576), :polkadot }}
{{ kusama: [set to be 10% annually](https://github.com/paritytech/polkadot/blob/756ccc35e93d1a78e3c71a0e67ae4da5f1d09f69/runtime/kusama/src/lib.rs#L535), :kusama }}
with validator rewards being a function of the amount staked and the remainder going to the
treasury.

:::info

DOT went through [redenomination](./learn-redenomination.md) in 2020 that saw the DOT token supply
increase by 100 times.

The current token supply on {{ polkadot: Polkadot :polkadot }}{{ kusama: Kusama :kusama }} is
{{ polkadot: <RPC network="polkadot" path="query.balances.totalIssuance" defaultValue={12230666300429914781} filter="humanReadable"/> (Over 1.2 Billion DOT). :polkadot }}
{{ kusama: <RPC network="kusama" path="query.balances.totalIssuance" defaultValue={12619256191792480093} filter="humanReadable"/> (Over 12 Million KSM). :kusama }}

:::

There is an _ideal staking rate_ that the network tries to maintain. The goal is to have the _system
staking rate_ meet the _ideal staking rate_. The system staking rate would be the total amount
staked over the total token supply, where the total amount staked is the stake of all validators and
nominators on the network. The ideal staking rate accounts for having sufficient backing of
{{ polkadot: DOT :polkadot }} {{ kusama: KSM :kusama }} to prevent the possible compromise of
security while keeping the native token liquid.
{{ polkadot: DOT :polkadot }}{{ kusama: KSM :kusama }} is inflated according to the system staking
rate of the entire network.

:::info

According to the inflation model, this would suggest that if you do not use your
{{ polkadot: DOT :polkadot }}{{ kusama: KSM :kusama }} for staking, your tokens dilute over time.

:::

The ideal staking rate on {{ polkadot: Polkadot :polkadot }}{{ kusama: Kusama :kusama }} also varies
with the number of parachains (50% is the current estimation of all
{{ polkadot: DOT :polkadot }}{{ kusama: KSM :kusama }} that should be staked, per parachain slot).

:::info The ideal staking rate varies based on the number of parachains

The current staking rate on
{{ polkadot: Polkadot still assumes the absence of parachains, with the suggested ideal staking rate of 75%. :polkadot }}
{{ polkadot: You can track the progress on the issue to adjust it [here](https://github.com/paritytech/polkadot/pull/5872). :polkadot }}
{{ kusama: Kusama has an ideal staking rate of approximately 50% with 50 parachains. :kusama }}
{{ kusama: When the number of slots reaches 60, the ideal staking rate is 45%. [Here](https://github.com/paritytech/polkadot/blob/master/runtime/kusama/src/lib.rs#L535) is the code for reference. :kusama }}
This code assumes that the number of slots auctioned correspond to the number of parachains on the
relaychain, which may not be true as new slots can be occupied by old parachains that are renewing
their lease. You can also track the progress on resolving this specific issue
[here](https://github.com/paritytech/polkadot/pull/5872).

:::

If the amount of tokens staked goes below the ideal rate, then staking rewards for nominators go up,
incentivizing them to stake more tokens on the network. On the contrary, if it goes above the ideal
rate, staking rewards drop. This is a result of the change in the percentage of staking rewards that
go to the Treasury.

![staking](../assets/NPoS/staking-rate-with-parachains.png)

<p style={{textAlign:"center"}}>Source: <a href="https://w3f-research.readthedocs.io/en/latest/polkadot/overview/2-token-economics.html">Research - Web3 Foundation</a></p>

- **x-axis**: Proportion of {{ polkadot: DOT :polkadot }}{{ kusama: KSM :kusama }} staked
- **y-axis**: Inflation, annualized percentage
- **Blue line**: Annual inflation rate of NPoS, i.e. total amount of tokens minted to pay validators
and nominators.
- **Green line**: Annual rewards rate for stakers. For instance, 0.2 corresponds to 20% of annual
returns on the staked tokens.

You can determine the staking rewards by looking at the top bar of the staking overview on
[Polkadot-JS UI](https://polkadot.js.org/apps/#/staking).

The above chart shows the inflation model of the network. Depending on the staking participation,
the distribution of the inflation to validators/nominators versus the treasury will change
dynamically to provide incentives to participate (or not participate) in staking.

For instance, assuming that the ideal staking rate is 50%, all of the inflation would go to the
validators/nominators if 50% of all KSM / DOT are staked. Any deviation from the 50% - positive or
negative - sends the proportional remainder to the treasury and effectively reduces staking rewards.

For those who are interested in knowing more about the design of the inflation model for the
network, please see [here](https://research.web3.foundation/Polkadot/overview/token-economics).

## Staking Miner

:::caution
Expand Down
1 change: 1 addition & 0 deletions polkadot-wiki/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ module.exports = {
items: [
"learn/learn-assets",
"learn/learn-DOT",
"learn/learn-DOT-inflation",
"learn/learn-teleport",
],
},
Expand Down
Loading