Inflation system

The Namada protocol controls the Namada token NAM (the native staking token), which is programmatically minted to pay for algorithmically measurable public goods - proof-of-stake security and shielded pool usage - and out-of-band public goods. Proof-of-stake rewards are paid into the reward distribution mechanism in order to distribute them to validators and delegators. Shielded pool rewards are paid into the shielded pool reward mechanism, where users who kept tokens in the shielded pool can claim them asynchronously. Public goods funding is paid to the public goods distribution mechanism, which further splits funding between proactive and retroactive funding and into separate categories.

Proof-of-stake rewards

The security of the proof-of-stake voting power allocation mechanism used by Namada is dependent in part upon locking (bonding) tokens to validators, where these tokens can be slashed should the validators misbehave. Funds so locked are only able to be withdrawn after an unbonding period. In order to reward validators and delegators for locking their stake and participating in the consensus mechanism, Namada pays a variable amount of inflation to all delegators and validators. The amount of inflation paid is varied on a PD-controller in order to target a particular bonding ratio (fraction of the NAM token being locked in proof-of-stake). Namada targets a bonding ratio of 2/3, paying up to 10% inflation per annum to proof-of-stake rewards. See reward distribution mechanism for details.

Shielded pool rewards

Privacy provided by the MASP in practice depends on how many users use the shielded pool and what assets they use it with. To increase the likelihood of a sizeable privacy set, Namada pays a variable portion of inflation, up to 10% per annum, to shielded pool incentives, which are allocated on a per-asset basis by a PD-controller targeting specific amounts of each asset being locked in the shielded pool. See shielded pool incentives for details.

Public goods funding

Namada provides 10% per annum inflation for other non-algorithmically-measurable public goods. See public goods funding for details.

Detailed inflation calculation model

Inflation is calculated and paid per-epoch as follows.

First, we start with the following fixed (governance-alterable) parameters:

  • is the cap of proof-of-stake reward rate, in units of percent per annum (genesis default: 10%)
  • is the cap of shielded pool reward rate for each asset , in units of percent per annum
  • is the public goods funding reward rate, in units of percent per annum
  • is the target staking ratio (genesis default: 2/3)
  • is the target amount of asset locked in the shielded pool (separate value for each asset )
  • is the number of epochs per year (genesis default: 365)
  • is the nominal proportional gain of the proof-of-stake PD controller, as a fraction of the total input range
  • is the nominal derivative gain of the proof-of-stake PD controller, as a fraction of the total input range
  • is the nominal proportional gain of the shielded pool reward controller for asset , as a fraction of the total input range (separate value for each asset )
  • is the nominal derivative gain of the shielded pool reward controller for asset , as a fraction of the total input range (separate value for each asset )

Second, we take as input the following state values:

  • is the current supply of NAM
  • is the current amount of NAM locked in proof-of-stake
  • is the current proof-of-stake inflation amount, in units of tokens per epoch
  • is the proof-of-stake locked token ratio from the previous epoch
  • is the current amount of asset locked in the shielded pool (separate value for each asset )
  • is the current shielded pool inflation amount for asset , in units of tokens per epoch
  • is the shielded pool locked token ratio for asset from the previous epoch (separate value for each asset )

Public goods funding inflation can be calculated and paid immediately (in terms of total tokens per epoch):

These tokens are distributed to the public goods funding validity predicate.

To run the PD-controllers for proof-of-stake and shielded pool rewards, we first calculate some intermediate values:

  • Calculate the latest staking ratio as
  • Calculate the per-epoch cap on the proof-of-stake and shielded pool token inflation
    • (separate value for each )
  • Calculate PD-controller constants to be used for this epoch

Then, for proof-of-stake first, run the PD-controller:

  • Calculate the error
  • Calculate the error derivative
  • Calculate the control value
  • Calculate the new

These tokens are distributed to the proof-of-stake reward distribution validity predicate.

Similarly, for each asset for which shielded pool rewards are being paid:

  • Calculate the error
  • Calculate the error derivative
  • Calculate the control value
  • Calculate the new

These tokens are distributed to the shielded pool reward distribution validity predicate.

Finally, we store the latest inflation and locked token ratio values for the next epoch's controller round.