Security Enhancement: Adjusting Fees for Generate ID

Impact

This change ONLY concerns miners, who run NKN nodes.

This does not have any impact on NKN mainnet token holders or users, does not impact off-chain data transmission, and does not impact normal on-chain transactions including token transfers.

In addition, this will not impact any exchanges (with the exception of Upbit) who trade in ERC-20 NKN tokens.

Why

NKN prizes itself as the largest permissionless blockchain network in the world with over 100,000 full consensus nodes, reflecting the team’s true belief in the power of decentralization. Mining fairness and security of mainnet, is a primary goal of NKN.

When NKN mainnet was launched in 2019 we implemented a mechanism that when a node generates ID, it needs to pay some fee to prevent a few possible attacks. The fee is paid to the Mining Bonus Address (MBA, see details in Appendix B) to increase future mining rewards per block for all miners. Eventually all the fee will be paid back to miners. Currently the fee is set to zero to lower the entrance barrier to encourage new nodes.

However, as the network has gained more attention recently, security is becoming the most important concern. To make the network more secure and enforce mining fairness, we will adjust the generate ID fee to 10 NKN in version v2.1.1.

What

The following changes will be implemented:

  • New node ID will replace the old node ID. Old node ID will be obsolete.
  • It will cost each mining node 10 NKN to generate a new ID. The fees will be automatically deposited into the MBA wallet, which will increase future mining rewards for all miners’ benefits. Neither the NKN Foundation nor NKN team can benefit from it. Eventually all the fee will be paid back to miners.
  • There will be minimal disruption to existing mining nodes, as NKN Foundation will cover the one-time cost for all existing qualified nodes [see details in Appendix A].

How

The complete upgrade will include 3 phases:

Phase 1: before block height 2570000 (ETA: UTC 04:00 April 26)

  • All nodes need to upgrade to v2.1.1 before block height 2570000

  • Please do not deploy new nodes in this phase as node ID will become invalid soon.

Phase 2: block height 2570000-2600000 (ETA: UTC 04:00 April 26 - 04:00 May 4)

  • Existing nodes with old ID can generate new ID. To minimize impact on existing network, the NKN Foundation will pay for this new Generate ID fee for all qualified existing nodes, as a one-time courtesy. Existing nodes just need to keep online and wait for a new ID.

  • New nodes can register new ID by paying a fee of 10 NKN. You just need to make sure node wallet address (NOT beneficiary address) has enough balance, either before or after node starts.

Phase 3: after block height 2600000 (ETA: UTC 04:00 May 4)

  • All old IDs will become invalid. Nodes without new ID need to generate new ID by paying a fee of 10 NKN.

  • All nodes will run with new ID, blockchain data will not be impacted.

What Do I Need to Do

If you already have NKN nodes up and running, and you can get its status from the public Internet (e.g. nstatus.org), you just need to update to the latest version and keep it running. There is nothing else you need to do.

If you want to deploy new nodes into the network, wait until block height 2570000 before doing so. After you deploy a new node, node status (e.g. you get it from nstatus.org) will contain a no ID message, together with your node’s wallet address. You can deposit 10 NKN into that address and the node will generate a new ID automatically.

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.

If you still have questions, please feel free to hop onto our Discord channel for live discussion with fellow miners and developers. Or you can send us an email to [email protected].

Appendix A: Existing Node ID qualified to be paid by NKN Foundation

We will use the data crawled by our open source crawler to determine the Generate ID transaction that NKN foundation will pay for. To be qualified, a node needs to have port 30001-30005 open (same as the mining requirement for nknd) and was online for at least one crawling period (10 minutes) during UTC 00:00 April 19 to UTC 06:00 April 23. If a node has changed its public key during this period, only the last one will be qualified. A node also needs to continue being online during Phase 2 to be qualified.

Appendix B: Mining Bonus Address (MBA)

Mining Bonus Address (MBA) is NKNaaaaaaaaaaaaaaaaaaaaaaaaaaaeJ6gxa. The Mining Bonus Address is a special NKN wallet address that can transfer tokens into it but not out from it, like a deposit-only account. It is intended to provide additional mining rewards to all NKN miners.

The tokens in MBA will be distributed to miners to increase normal mining reward over long periods of time. Any token transferred into MBA will be added to extra mining rewards starting from 1,576,800 block height, with each year releasing half of the tokens remaining.

Note: We are not changing the original mining schema or the token release schedule. Any rewards that come from the Mining Bonus Address are extra.

With the Mining Bonus Address, we have a mechanism both to boost NKN network expansion in the short term, as well as improve attack resistance over the long term.

Initially, the NKN Foundation will donate to the Mining Bonus Address. But any individual or organization is welcome to donate to the Mining Bonus Address.

Source:

https://forum.nkn.org/t/mining-bonus-address-and-why-mainnet-started-before-july-1/1182

1 Like

Miners will now have to pay around 10 NKN per node to have new nodes in the network, this fee is equivalent to 1 month of a server monthly fee.

Now miners will have 3 concerns:

1- Currency fluctuation

2- The monthly fee of the server

3- The rate equivalent to 1 month of mining to have new nodes.

I didn’t welcome this new update, this new charge to have new nodes will dramatically decrease the new nodes implemented,

Honestly, I am not support this update.

As I saw in previous post, ID will somewhat affect node’s potential reward.
It will be much more unlucky if you got a node ID with less neighbour nodes to relay msg.
Generate a new ID and reput our node is easiest way (if not the only way) to improve node performance.

Distribute rewards more randomly will be a better solution at fundamental, and it could also prevent miners generate useless ID. Just my humble opinion.

https://forum.nkn.org/t/no-rewards-for-weeks-mining-on-digital-ocean/2336/10?u=unreal

1 Like

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