The science behind Nym token economics
This blog post delves into the simulations that were run and reported on in the Reward Sharing for Mixnets paper by Claudia Diaz, Harry…
This blog post delves into the simulations that were run and reported on in the Reward Sharing for Mixnets paper by Claudia Diaz, Harry Halpin and Aggelos Kiayias (which also contains a game theoretical analysis of the reward scheme including proofs of the scheme’s equilibrium properties). The simulator has been released and is open source for anyone to check the results and try out their own simulations. The simulations were run to test the reward-sharing scheme of Nym in two non-equilibrium scenarios.
An earlier blog post explained the main features of Nym token economics under ideal conditions — in its equilibrium state. Equilibrium means that all the available NYM supply is staked on a sufficient number of nodes to serve demand (the current configuration is set to 720 nodes in the reward set), such that these nodes have maximum reputation and are selected for rewards in every epoch. The mixnet is constantly pulled towards the equilibrium by the incentives: the more stakeholders that collectively act to maximise their own rewards, the more the mixnet approaches the equilibrium with the desired network features.
But as we all know, the real world is a little more complicated: there will be a lot more nodes registered than 720 and thus not all nodes will be selected for rewards in every epoch. Also, some stakeholders may not allocate their stake optimally, others may even fail to stake at all, meaning that only part of the available NYM supply is staked on nodes and not all nodes have maximum reputation.
What does this look like in terms of rewards and how does the system behave under less ideal conditions? These simulations give some insight into the distribution of rewards to nodes in two plausible non-equilibrium scenarios.
These are hypothetical scenarios that were simulated in order to test the properties of the scheme. For those who want to calculate mix node or delegator APY, there will be more news on important updates to the reward-sharing scheme and how to calculate real world APY — coming soon.
NOTE: The paper does not say anything about the real-world profitability of an individual node as that will depend on the overall distribution of stake among nodes as well as individual node parameters including performance and reputation. To be clear, this is from an academic paper and not an investment prospectus or financial advice. We use the term ‘APY’ in a loose generic sense based on ‘Return on Stake’, and are relying on hypothetical scenarios using experimental technology. Actual results using the technology will vary widely. It’s quite possible that this venture could result in loss of monetary funds for anyone who uses the software.
How were simulations run?
A custom Mixnet Token Economic Simulator of the Nym reward scheme was implemented in Python. The simulator was built to run different deployment scenarios, illustrating how the reward scheme works and assessing the impact of different bonding and delegation choices.
This same simulator was used to obtain the results reported in this blog post and in the Nym Reward Sharing for Mixnets paper. It has been open sourced, enabling everyone to reproduce these results as well as to run simulations considering any other scenarios of interest, and obtain estimations of APY for mix nodes and delegators with different system and node configurations. We will shortly be releasing an interface and video guide for the simulator to make it even easier to simulate rewards and study the economic performance under different circumstances.
The rest of this blog post reports simulation results on reward distributions in two scenarios: no user fees (due to the mixnet being free of charge or low adoption rates) and high user fees (due to rapid adoption by paying users).
Node parameters and stake distribution
Before running the simulations, certain network parameters and node compositions were assumed. This is necessary in order to obtain concrete results. In a nutshell, the main assumptions when running these simulations were that:
- There are 1,440 nodes registered in the network. Of these, 720 nodes are selected to the reward set each epoch, of which half (360) are selected to be active and the other half to be in standby.
- All nodes have a flat monthly cost set to $200, a profit margin of 10%, and perfect (100%) performance.
- The assumed overall level of staking is 75% of the available NYM supply. Of this, 15% of stake is bonded to nodes by the operators, while the other 60% is delegated to nodes by stakeholders, with bond and delegated quantities varying per node.
The simulations considered mix nodes with a diverse combination of bond and stake making out their reputation in order to reveal the effects of these different node compositions on rewards. Some node operators might start off with a lot of NYM of their own that they can bond, while others might only have the minimum (currently 100NYM) and have to make up for low bond with delegated stake in order to have a good reputation.
The biased distributions of bond and total stake over mix nodes in the simulations looked like this:
In the x axis of the figures you can see the 1,440 nodes, ordered by decreasing bond (left figure) and by decreasing overall reputation (right figure). The y axis represents the amount of bond (left figure) and total stake (right figure) of each node.
As you can see in the left figure, the distribution of bonds is very skewed (similar to a Pareto distribution), with a few dozen nodes having saturated bonds (of about one million NYM), a couple more hundred nodes having high bond values of tens or hundreds of thousands of NYM, and more than half the nodes having much smaller bonds of around one thousand or a few thousand NYM.
The right figure shows the assumed distribution of reputation (green line), which accounts for both the bond (blue lines) and the delegated stake (gap from the blue line to the green). As you can see, some nodes with small or medium bonds have high reputation thanks to delegation, while other nodes (notably from node 1,100 until 1,440) have minimal bonds and no delegation, adding up to minimal reputation. The vertical dotted line at 720 marks the number of rewarded nodes, showing that there are more than 720 nodes with non-negligible reputation, and thus that only some of them are selected for rewards in each epoch.
Two simulation scenarios
Two main deployment scenarios were simulated and reported in the scientific paper:
- The first simulation ran a scenario where mixnet usage is free of charge and all the available rewards come only from the mixmining pool. This scenario provides a lower bound on the reward distributions to nodes and delegates in conditions with low to moderate usage.
- The second simulation ran a scenario where network demand grows very significantly over time, triggering the need to scale the mixnet beyond its initial size (i.e., rewarding more than 720 mix nodes) to serve all the demand. In this case income from usage fees is added to the mixmining rewards to fund the growth of the network. This scenario studies network scalability and the rewards of nodes and their delegates in conditions of high demand.
The paper provides a detailed list of parameter values used in the simulations and a justification of the choices that were made for these illustrative examples. You can use the open source simulator to experiment with parameter values and assumptions, and obtain reward distributions for other scenarios.
Scenario 1: rewards from mixmining pool only (free mixnet usage)
The first scenario focuses on a “bootstrapping” scenario where demand is low to moderate, usage fees are not yet turned on and all the rewards come from the mixmining reserve. The distribution of bond and reputation over mix nodes is as just described. The simulated scenario assumes nodes have a monthly operational cost of $200 and that $1 corresponds to 1 NYM.
The simulator results show that the annualised rewards given to mix nodes in this scenario range from zero to almost 100,000 NYM of earnings per year, depending on the mix node reputation and performance. To better understand the impact of node reputation on rewards, each mix node can be represented by a dot with coordinates defined by the node’s reputation and its received rewards.
This is shown in the figure below, where each blue dot represents a simulation result for one mix node, taking into account its reputation (x axis) and received rewards (y axis):
As you can see, mix nodes that have maximum reputation (saturation 1.0) receive the most rewards, amounting to between 65,000 and close to 100,000 NYM per year. Nodes with lower reputation levels receive lower rewards. In this example, a node with total stake (reputation) at half the saturation level (0.5, corresponding to about half a million NYM) receives between 20,000 and 30,000 NYM per year. At the low reputation extreme, nodes with stake saturation levels below 0.1 receive very small rewards, due to both being selected rarely for rewards and also to being rewarded at a low rate when selected.
The rewards received by the mix node are shared among the operator and its delegates, depending on the node’s operational cost, the profit margin, and the stake brought in by each stakeholder. These simulations consider that all nodes have a monthly cost of $200 ($2,400 annual) and that they all take a profit margin of 10% of delegate rewards.
Considering this configuration, the figure below shows the annualised profit received by mix node operators relative to their bond size (excluding delegated stake), where the maximum bond (1.0 in the x axis) corresponds to the stake saturation point of one million NYM. Note that the profit is considered after refunding declared node costs and that a negative profit (below the red line) means that node costs are not fully covered by rewards:
As expected, operators with larger bonds invest more stake in the system and thus make more rewards — provided that their mix node has adequate performance. Variation in operator rewards at the high end of bond saturation (near 1.0) mirrors the variation in overall rewards for high-reputation nodes shown in the previous figure, and it is mainly due to the effects of sampling to the active set: nodes that are lucky to be sampled as active more times receive more rewards in the simulation run compared to nodes that are unlucky and sampled less frequently in the simulation run.
Variation caused by mix node reputation does however have a significant impact on nodes with small bonds (left side of the figure, near 0.0). As shown in the figure, top earners in this category (nodes with small bond but high reputation) make up to 10,000 NYM in net profits (after costs) per year, while other nodes (small bond and no delegation) take losses of more than 2,000 NYM (blue area under the red line). Nodes that take losses are those that have little or no delegation, and thus their reputation is minimal, which means that they rarely are selected for rewards while still having costs of $2,400 (converted as 2,400 NYM in this scenario) per year for keeping the node operational.
The rest of the mix node rewards are shared among delegators proportionally to their delegated stake. The figure above represents the APY of a node’s delegators relative to the node’s reputation. Each blue dot represents the simulation result for one node. The x coordinate of the dot is given by the node’s stake saturation (reputation) level and the y coordinate provides the APY (Annual Percentage Yield without compounding effects) received by the node’s delegators. A value of 0.07 for the APY of a node means that a stakeholder who delegates 100 NYM to the node receives 7 NYM in rewards over the course of a year.
Any node that receives fewer rewards than its operational cost does not distribute any rewards to delegators, as all the received rewards are required to cover as much as possible of the node costs and thus retained by the operator. The figure shows that with the assumptions in the simulated scenario, nodes below 20% of stake saturation (0.2 in the x axis) do not distribute rewards to delegators due to this effect.
Once mix nodes cover operational costs, they start sharing rewards with their delegators. As shown in the figure, the higher a node’s reputation, the better the APY that it can offer to delegators. This encourages stakeholders to concentrate their support around a target number of mix nodes (to be precise, the number of rewarded nodes, initialised as 720) that aggregate high reputation. In the simulated scenario, fully saturated nodes (with a saturated reputation of 1.0) are able to offer an APY of between 5% and 7% to their delegates, even after taking 10% of the delegate profits as a fee (profit margin).
Remember there is a stake saturation point after which node operators and delegators no longer benefit from increasing stake of a node. This incentivises delegators to delegate across an ideal number of nodes for servicing demand, and operates as a soft cap against centralisation.
Scenario 2: rewards from paid service (user growth and network scaling)
The second scenario examined in the paper simulates rapid growth in user demand that triggers scaling of the mixnet, such that after five years the mixnet has almost tripled in size, from 720 to more than 2,000 mix nodes rewarded per epoch. In this scenario, after five years the user fees generated by the service amount to two thirds of the 13 million NYM available monthly rewards, with the remaining third of the monthly reward budget (around 4 million) coming from the mixmining pool.
The figure below shows the mix node rewards distributed in the fifth year of the simulated scenario, considering 2,000 rewarded mix nodes per epoch out of 4,000 registered mix node candidates in the network. Compared to the node rewards at bootstrapping shown in the first figure, the rewards per node remain remarkably stable over time even with mixnet scaling.
The same is true for mix node operator rewards, as shown in the figure below, which also remain remarkably stable despite changes in network scale. Compared to operator rewards in the first scenario, the higher density of blue dots in the medium and higher bond saturation values is due to two effects: first, this scenario has more mix nodes (and thus more samples overall); and second, the stake saturation point is lower due to the increased number of rewarded nodes, meaning that the same amount of bonded tokens results in a higher saturation for the node in this scenario compared to the first one, and thus there are more nodes with higher saturation.
The main difference between the two scenarios becomes evident when studying the APY of delegators. The results in the fifth year of the simulated scenario are shown in the figure below. In this case, high reputation nodes provide an APY to their delegators between 9% and 20%.
The increase in APY is due to the increase in available rewards, as the network receives income from usage fees that are available as rewards in addition to the mixmining reserve (in this scenario the combined available rewards are around 13 million NYM per month in the fifth year of simulation). As the overall available rewards increase compared to the previous scenario while the amount of stake on the overall network remains the same, this naturally leads to higher rewards per staked token.
Also note that the extra income funds the network growth by rewarding more nodes. Increasing the number of rewarded nodes has the effect of reducing the stake saturation point, meaning that fewer tokens are needed to reach a certain reputation, and thus nodes are more easily rewarded at high rates. This is a consequence of network scaling and an additional contributing factor to high APY in high user demand conditions.
Nym Reward Sharing for Mixnets paper
Mixnet Token Economic Simulator
Privacy loves company
Discord // Telegram // Element // Twitter
The internet is global and so is Nym: join the Nym Community wherever you are and help build the private internet today.
English // 中文 // Русский // Türkçe // Tiếng Việt // 日本 // Française // Español // Português // 한국인