Node rewards

From Internet Computer Wiki
Revision as of 01:20, 21 July 2022 by Chadwick.ahn (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The IC rewards node providers (NPs) for the capacity they supply to the IC by providing nodes. This page describes based on what data the reward amounts are computed, and how the rewards are transferred to the NPs.

Several improvements are planned in the future. For example, NPs currently receive full rewards even if their nodes have been offline for some period of time, and several NPs receive rewards even though not all of their nodes have been enrolled in the IC. The purpose of this document is not to discuss planned future changes to the reward procedure, but rather to describe the exact process as it is implemented today.

How the rewards are computed

Rewards are computed for each node individually. The amount per node and month depends on two parameters:

  • The location of the node, as hosting prices differ between locations.
  • The type of the node; there are different hardware and connectivity specifications, and the rewards depend on the specification of a node.

For each node that is assigned to an NP in a given month, the NP receives the rewards according to the above two node properties. The rewards are specified in XDR, and are converted into ICP based on the average exchange rate over the last 30 days.

How the computation is performed on the IC

There are two main types of entries in the registry that are relevant for the reward computation.

Rewards per node type

The registry stores a table that lists, for each node type and region, the amount in XDR awarded for each such node per month. The table can be updated through NNS proposals, such as the one that created the initial table. To explain in a bit more detail, let us consider the following part of the table:

...
North America,US:{
   rates:{
      type0:{
         xdr_permyriad_per_node_per_month:8733638
      }
      type2:{
         xdr_permyriad_per_node_per_month:16041375
      }
   }
}
North America,US,California:{
   rates:{
      type0:{
         xdr_permyriad_per_node_per_month:10872488
      }
   }
}
...

The first record is for the region North America,US, and specifies rates for node types type0 and type2. The second record is for the region North America,US,California, and specifies rates for node type type0. The matching for the region is hierarchical, which means that a node of type type0 in the region North America,US,California receives the reward from that designated record. A node of type type2 in the same region would receive the rewards as specified in the record for the region North America,US.

Nodes rewarded for each node provider

Each NP is associated with one or more node operators (NOs). Each NO specifies two things:

The algorithm for computing an NP’s rewards can then be written in pseudocode as follows:

For each NO associated with the NP:
   For each (type, n) in NO.rewardable_nodes:
      total += n * rewards_from_table(NO.DC.region, type)

How rewards are transferred to the NP

The rewards are converted to ICP and paid to an account specified by the NP.

Conversion from ICP to XDR

The conversion from ICP to XDR is based on the exchange rate returned by the cycles-minting canister (CMC). The CMC keeps a rolling average over the ICP closing price over the last 30 days, which can also be requested by calling the function get_average_icp_xdr_conversion_rate on the CMC rkp4c-7iaaa-aaaaa-aaaca-cai.

The node provider’s ICP account

By default, the rewards are paid to the ICP account controlled by the NP principal. The NP can configure an alternative ICP account for receiving the monthly rewards using quill.

When are the rewards paid out?

The computation and transfer of monthly node rewards is currently initiated by a proposal (example here) that is submitted on the 14th of each month. In the future, the reward process will be initiated automatically by the NNS.