Security Enhancement: Adjusting Fees for Generate ID

We thought long and hard about adjusting the fees for new mining nodes, so this is not a decision taken lightly. And the primary trigger this time is security concerns, to ward off certain types of attacks. Trust us, it is definitely in the interest of all miners who can mine a fair share of NKN!

In addition, we would like to emphasize a few points:

  1. This is not a surprise topic. We have the recent NKP020 detailing our thought process, pros and cons, and solicit community feedback over the last 2 months or so.
    [NKP0022] Minimum Staking Requirement for NKN mining

  2. All the fees for generate ID, are returned to Miners in the form of increased mining reward for every block. It does not benefit NKN team or NKN Foundation in any way. In fact, NKN Foundation is going to donating up to 1.5M NKN mainnet tokens for paying the generate ID fee for existing qualified nodes. In the future, if there are better solutions, we can always adjust down the generate ID fee.

  3. We promise to keep ERC-20 to mainnet swap tool open almost all the time so it will be easy to acquire NKN mainnet tokens.

On top of the above, we are discussing with NKNx team about how we can support small and independent new miners in the future (once the mainnet is successfully updated to v2.1.1)

Even if the mainnet swap tool is open, did you notice the value of the transfer on the ERC-20 network?

I will re-post my reply under another post here:

Thanks for detailed thoughts!

We know it’s controversial, that’s why we have been discussing it for a long time. The feature was implemented two years ago before mainnet was launched, but we have never enabled it until absolute necessary for network security.

Although the generate ID fee is called fee, it’s essential not a fee. All the “fee” will be deposited into MBA address and increase long term block reward. Let’s see some examples:

  • Let’s assume there are 100k nodes in the network, each paid 10 NKN generate ID fee. So the MBA address pool has 1M NKN. If all nodes stay in the network forever, and no new node joins, then each node will eventually get back 10 NKN more mining reward on average.
  • In a more realistic case, let’s say some nodes left, some more come, but the network size is still 100k nodes, and the MBA address pool has 2M NKN. Then nodes who stay in the network will eventually get about 20 NKN on average. This encourages long term miners which is exactly what we want.

You have thought a lot about miner’s convenience, but probably not from network security’s perspective. It a blockchain is not secure enough (i.e. attackers can gain unfair mining advantage by ID sybil attack), mining is meaningless for honest miners. As we have seen recent attempt to attack the network, this mechanism needs to be enabled ASAP before some attacker can successfully perform the attack and get most (if not all) mining rewards.

IMO this is an inevitable trend in public blockchain. PoW and PoS are the only two batte-tested category that can make a public blockchain safe, and many PoW chain are moving towards PoS (Ethereum for example) for better security, better performance and less resource consumption. Although NKN is using PoW-like relay for reward, such relay is not intended to saturate all your network or any other kind of resources, so it’s not enough for security alone. That’s why some kind of staking, fee, etc is necessary for network security. After all, security is the top priority for any blockchain.

Among all the similar proposals, the current generate ID mechanism has the lowest entrance barrier. Staking (NKP-0022), for example, requires a significant higher amount of NKN (usually 10x or 100x) in order to reach the same security level.

I know currently it’s not very convenient to purchase mainnet NKN for most people, but for the long terms things will be better:

  • Many Ethereum scaling solution are working hard to lower Ethereum txn cost
  • The ERC20->NKN swap system will basically be open almost all the time
  • More exchange might support NKN mainnet token in the future

Eventually generate ID it will become as simple as nknx fast deploy, and it pays back in mining reward over the long term.

Is the fee paid out from the MBA to the individual node wallet address or the beneficiary address? Do have to watch all node wallets now?

Still to the beneficiary address. It’s not a separated payoff, it’s part of the mining reward. When the code compute the mining reward per block, it will use base + a ratio of current MBA address balance

The main issue with this approach is that it doesn’t scale correctly. It becomes harder and harder to earn back the 10 NKN fee as the network grows in size.

If the price of NKN increases by a factor of 10 we can expect the number of nodes to increase by 10 but the number of rewarded NKN per block remains the same.

With 10k nodes in the network, it would take around 10k blocks to earn back your 10 NKN, which is around 2.3 days with a blocktime of 20 seconds.

With 100k nodes, it takes around 10 times that long - 23 days.

With 1000k nodes it takes around 10 times longer than that, 230 days.

It becomes harder and harder to earn back the fee you paid in. The bonus mining reward that comes from other miners joining the network is NOT to be relied upon. For example in bear markets we can expect that no one is joining the network. Depending on new members to join the network and pay the fee for you to make profit is what’s known as a pyramid scheme. It’s good for this mechanism to exist, it just should not be the core of the profit.

One solution is to fix the fee in terms of USD rather than NKN. The average amount of time to earn back the USD fee would remain constant regardless of how many are in the network.

This doesn’t make the network more vulnerable. It keeps the cost of an attack proportional to the price of NKN. This change means the cost of an attack is proportional to the square of the price of NKN which is obviously wrong.

There are many ways to achieve fixing it to USD rather than NKN. For example Holochain managed to make their Holo Fuel price constant through an economic mechanism, regardless of how much the token fluctuates.

You say this change only impacts new miners, but the truth is that ultimately it does impact everyone who is a part of NKN because it greatly reduces the utility of NKN as a result of far fewer nodes. The chances of reaching over 10 million nodes is zero with this change - it would take decades to earn back your fee to start mining.

A node only gets one block per month on average. Isn’t it useless to charge such a high fee? Which one will continue to contribute?
Your announcement was too sudden and did not give users enough time to prepare. For example, I deployed some nodes last night(4-23).
And how do I continue to use the previously charged nodes? Do I need to pay again after changing the vps? Is there a solution?

1 Like

That’s indeed a good point, but 10 NKN is just a parameter that can be changed at future height. Ideally we might want to find a way that can adjust it using algorithm, but in the worst case we can fall back to periodically adjustment based on network size.

Usually there will be a longer period of discussion time for significant changes, but this time it’s related to an ongoing attempt to attack the network, so we need to make sure attackers have short response time… Also, whenever we make the announcement, we cannot pay for nodes that are deployed after the announcement.

As for backup and restore node ID, you can check this part of the post:

If you want to backup and restore node ID, you just need to back up wallet.json and your wallet password. For nkn-commercial and one-click, password is stored in file wallet.pswd. Note that each node must have a unique wallet.json in the network.

This is complete nonsense. Forgive me for my frankness.
All other projects simply freeze tokens.
See examples 1inch, cake and many more.
Freezing tokens is a normal practice. Taking tokens from the community is not normal!
I understand why you are doing this, but I do not understand why you chose to pick up tokens.
Wasn’t it easier to freeze 100 tokens for each launched node? Everything follows the path of freezing and only you take the tokens from the community! It is not right!

3 Likes

Why didn’t you freeze the tokens. For example, 100 tokens for 1 node but freeze. Why collect tokens from the community? You already collect 11 tokens for deploying ready-made solutions, why collect 10 more tokens? 11 tokens are not enough for you? Why not freeze it?

2 Likes

First of all, the generate ID fee is not going anywhere. It stays in mining bonus address, and returns to miner over long time. So if a miner keeps ming for long time, he will get back that fee. In this case it behaves as staking.

Staking is the initial proposal, as we discussed in NKP-0022. However, staking requires much more token to achieve the same level of security, like 100 as you said. This even makes the barrier higher.

So for our case the current mechanism has two advantages:

  1. It encourages long term miner
  2. It has much lower entrance barrier

This is nknx fast deploy, it’s made by nknx. Nknx is a community team, not us. You probably mix it up.

This is absolutely wrong and disadvantageous for the miners.
This is beneficial ONLY in ONE CASE - if the network is very small. If the network has 30,000 nodes, then it will be beneficial. If there are 100,000 nodes, then the investment in the network and servers will NEVER PAY OFF!
Let’s count:
100,000 nodes mine 40,000 coins.
Each node produces 0.25 coins per day.
In 1 year, 1 node will mine 90 coins.
At a rate of $ 1, this will be $ 90.
Now let’s estimate how much Amazon AWS costs for 1 node.
Let me tell you a secret, more than 250 for 32 nodes per month, for a total of about $ 8 per node per month.
Now let’s calculate, 90-10-92 = -12 dollars per year!
The loss is $ 12.
And this is at an optimistic price of $ 1 per coin.

I believe that only freezing coins is the right decision, taking coins in order to give them sometime later to someone else is NOT JUST.
We all know that some nodes find a block one by one, while other nodes will NEVER find a block! For a year, a node may not find 1 block, but it will pay 10 coins anyway!
At the same time, the nodes of a more successful miner will find more blocks and he will receive more MBA returns.
Your distribution system is not fair. Taking away from everyone in order to give it back on the basis of some algorithms is wrong.
If your algorithm returned the fee per node for a year, regardless of the success of the node, it would be fair.
And so you will take my 10 coins from my nodes, and then give this money to another more successful miner!
Therefore, I believe that only freezing coins is an honest algorithm, I do not want my coins to be received by other miners. THIS IS NOT JUST!

3 Likes

Freezing NKN is the best and right way, I suggest to mine, each node should freeze 1000 NKN

I am against the reallocation of resources.
See an example.
Let’s say Johnny and Michael each have 100 nodes.
Johnny’s nodes have mined 1000 coins within 1 year. Michael’s Nodes mined 10,000 coins throughout the year.
Both miners paid 1000 commission coins.
After the distribution, Joni received 300 coins back, and Michael received 2,000 MBA coins.
Why, at a completely equal cost, Johnny should give Michael 700 coins. Where’s the justice?
And if Johnny just gets sick or gets into difficulties and he cannot continue mining for 1 year. So Michael will take even more Johnny coins?
Why is there no fairness in your redistribution system?
Why don’t you make a 1 year coin hold for miners? Why take coins and redistribute them according to an incomprehensible and opaque algorithm?
I am ready to give even 100 coins for 1 node, BUT ONLY in HOLD! I need to be sure that as soon as I stop being a miner, my coins will be returned to me. IT IS IMPORTANT! I don’t want to be a sponsor of successful miners!

2 Likes

Just ask the community what they want - give away coins or HOLD coins!
I am sure that no one wants to give away 10 coins, so that later, according to some unclear criteria, they will be distributed to other miners.

There are a huge number of examples of token holding.
Why not follow the example of other projects? After all, such decisions were usually dictated to them by the community.
Make it HOLD, no need to collect tokens!

I think that you need to take 10 coins for each node and freeze them for six months.
The miner will be able to pick up his coins in six months, regardless of whether his nodes are working or not.
When a node is created, 10 coins are blocked on the wallet for six months. Six months later, these coins are unlocked.
Why take coins from a miner when you can just block them?

I understand what purpose you pursue.
You want to cut off nodes that do not last long.
But won’t a long HOLD coins solve this problem?
I am sure that only serious miners will freeze coins for a long time.
Also, do not forget that a miner may have personal motives to leave mining. Why would he daoljen donate his coins to other miners in this case?

I believe that your proposal is unfair and ill-considered.
Moreover, I do not see an honest scheme for the redistribution of coins.
I see that only one thing, take away the coins from everyone and then distribute them to someone according to unknown criteria.
Redistribution has never had positive results on any issue!
No project does this, not because they didn’t think of it, but because it’s not fair and transparent. In this case, there will be robbed and unjustly rewarded.

ONLY HOLD HONEST AND FAIR!

2 Likes

I am ignorant in the technical aspects but to comply with security requirements is the staking required in order to generate ID? Or could the fee be taken from first reward (similar model to that of NKNx)?

This would obviously save users having to A) avoid using mainnet conversion methods and B) Maintain node start up out lays to just server costs

1 Like

Not. They want to take 10 coins for each node.
That is, when you deploy 30 nodes on the server, you will pay 300 coins

This calculation has nothing to do with the generate ID fee, it only shows one thing: mining on cloud is not profitable. This is definitely true, and in the long term mining on VPS will simply be not profitable regardless of what. Plus, you didn’t consider the additional mining reward coming from MBA address. After you take that into consideration, each node mines exactly the same as before.

Let’s say Johnny and Michael each have 100 nodes.
Johnny’s nodes have mined 1000 coins within 1 year. Michael’s Nodes mined 10,000 coins throughout the year.

This will not happen. When you only have one node, luck plays an important role, and node reward can have huge variance. But when you have hundreds of thousands of them, they average out each other, and only node count matters.

I think that you need to take 10 coins for each node and freeze them for six months.
The miner will be able to pick up his coins in six months, regardless of whether his nodes are working or not.

This is exactly why staking is worse for network security. Malicious party can make use of this, stake and generate ID, then unstake the ones they don’t need, and use the rest to attack. In order to get same level of security, staking requires about 20x the amount (i.e. 200 NKN) assuming 5% opportunity cost, or 100x (1000 NKN) assuming 1% opportunity cost, making it infeasible for most miners. That’s why we would prefer miner get back token only through mining, it lowers the entrance barrier so much.

Just ask the community what they want - give away coins or HOLD coins!

You probably missed it but staking was our initial proposal, we have been discussing about staking for months all over the place (e.g. NKP-0022), collecting people’s feedback about what staking amount is acceptable, making detailed calculation about what amount is secure enough to prevent attack. That’s how we find staking cannot make both miner happy and network secure enough with the current condition. And from our perspective security is the top priority.

I am ignorant in the technical aspects but to comply with security requirements is the staking required in order to generate ID? Or could the fee be taken from first reward (similar model to that of NKNx)?

The fee cannot be taken from first reward, otherwise it will not improve the network security at all. Basically a node needs to pay the fee upfront, and then gradually get it back over a very long period of time if it stays in the network and continue mining.