The 10 NKN fee makes attacks cost the SQUARE of the price of NKN

We want the cost of an attack to be proportional to the price of NKN - if NKN becomes 10 times more expensive it should cost an attacker 10 times as much to attack the network.

The 10 NKN fee to start mining is means that the cost of attack isn’t proportional to the price of NKN, but proportional to the SQUARE of the price of NKN.

The reason is as follows: if the price of NKN rises by a factor of z then we expect there to be z times as many nodes in the network. So not only does the attacker have to have z times as many nodes to start an attack, the 10 NKN also costs z times as much so he ends up needing z^2 times as much money to start the attack. I’ll walk through an example with made-up values to illustrate but first I need to explain how miners reach equilibrium.

If it costs $1.00/month in costs to run a node in the network, then people are incentivised to keep starting new nodes, increasing the total number of nodes until the mining rewards goes below $1.00/month where people will stop making new nodes. If the price of NKN from here rises by a factor of 5, then we expect there to result with exactly 5 times as many miners before the mining rewards average $1.00 again. This is the equilibrium of mining - where the rewards in NKN of the network matches the cost of running the node. Now I’ll walk through the example of attack costs with imaginary values.

If there are 20,000 nodes in the network it means the price of NKN is $0.02 so the total network of NKN is worth $20m. Assume an attacker needs to create eg half of the total nodes to start an attack, so he will create 10,000 nodes each costing 10 NKN so it costs 100,000 NKN to start an attack, meaning his cost is $0.02*100,000 = $2,000 to start the attack. If NKN rises by a factor of 100 from $0.02 to $2.00, we expect the node count now to also rise to 100x its size for the miners reach equilibrium again so we expect 2,000,000 nodes in the network at this higher price. To generate an attack he needs half that many nodes again, so 1,000,000 nodes, each requiring 10 NKN for a total of 10,000,000 NKN needed. This costs $2.00 * 10,000,000 = $20m to start the attack. So you can see that the price of NKN rose by a factor of 100 but the cost to start an attack rose by 100^2 = 10,000.

The way to solve this is to tie the price to USD instead of NKN so that the cost of an attack remains proportional to the price of NKN rather than the square of the price of NKN.

Also, with a fixed fee of 10 NKN, it becomes more and more expensive to start mining on the network as the price of NKN rises. The growth of the node count of the network is crippled by a fee of 10 NKN. When NKN hits $100 it’s going to cost $1,000 to start a node. It would be impossible to recoup those costs from producing useful work in the network (relying on the bonus mining rewards is not acceptable). It is necessary to fix the price in USD not NKN.

Now the problem is how to make the fee fixed in USD without using an oracle.

Here’s one solution I thought of (that may be flawed) that relies only on knowing the addresses of the nodes that won each mining reward in the past 100,000 blocks and everyone in the network can agree on this without argument.

One way is to look at the distribution of the most recent 100,000 blocks (about 1 month in time) rewards to infer how many nodes there are in the network.

Look at the ratio of nodes that won 1 block reward to the number that won 2 block rewards. If the ratio is high eg 200:1 you know there are a large number of nodes in the network, if its low eg 4:1 you know there is a low number of nodes in the network. Since the nubmer of nodes in the network is tied to NKN’s price in USD due to the equilibrium point of mining, you can from this information infer the price of NKN in USD.

Eg suppose you tell me that in the past 100,000 blocks, 90% of addresses won 1 reward and 10% won 2 awards (this can be known by looking at the blockchain itself, the number that won 0 rewards is unknown). From this information I can infer that there are approximately 1 million NKN nodes in the network and from knowing the number of nodes I can make a good estiamte of the price in USD.

With 1 million nodes the chance of a reward is 1-(999999/1000000), so after 100k blocks your chances of winning 0 rewards is (999,999/1,000,000)^100,000 = 0.9. The chance of winning 1 reward is 0.1. And the chance of winning 2 rewards is about 0.1 * 0.1 = 0.01. 1 million nodes is required for the ratio to be 10:1 - if there were fewer nodes the ratio would be lower and if there were more nodes the ratio would be higher.

Obviously there’s much more sophisticated formulas to do this that use the number of nodes that won 3, 4, 5 rewards etc but this is the concept I’m working with at the moment. Although there’s probably a flaw with this idea that I’m not aware of, tbh I’m not even sure this would work with how beneficiary addresses function.

If NKN rises in price by a few orders of magnitude and the NKN teams decides to lower the cost from 10 NKN to eg 1 NKN, this will risk creating forks of the network. Miners of the network will be against lowering the price to start mining because they want fewer competitors. This is why I tried to think of a way for there to be a built in approach that adjusts the fee automatically that everyone can agree on.