Mining NKN For Fun And No Profit

Thu May 20, 2021

NKN runs on its own blockchain, which incentivises people to contribute their bandwidth to the network by rewarding them with NKN tokens. So how hard is it to set up an NKN node and can you make any money from it?

Setting up a node

Each node on NKN has its own wallet, which receives the mining rewards. To make it easy to set up multiple nodes you can also set up a beneficiary wallet, where all of your nodes will send their rewards. You can create your beneficiary wallet through the NKN online wallet here.

Once you’ve got your beneficiary wallet, setting up a node isn’t too challenging. If you have a linux box somewhere you can use nknx Fast Deploy to generate a script that will install everything you need and start mining immediately. The catch is that the first mining reward (currently ~ 11NKN) from each node will automatically be sent to the nknx project. After that the rewards are all yours.

🔔 The first big gotcha

The first gotcha is that before your node can start receiving mining rewards you have to pay 10 NKN to enable the wallet. This is a recent change and is apparently to stop abuse of the system. It doesn’t seem very decentralised or permissionless, but let’s ignore that alarm bell for now.

So where do you get the 10 NKN you need to enable your wallet? Well you have to get hold of NKN ERC20 tokens by buying them on an exchange or swapping them on a service like uniswap. Once you’ve done that (and paid the gas 😔) you can swap them for NKN mainnet tokens using the NKN Swap Tool.

🔔 🔔 The next big gotcha

There’s a minimum swap of 100 NKN. And be sure to triple check the details of your swap before you commit to it. The swap tool needs to know the address of the wallet that’s sending the ERC20 tokens. If you’re trying to send from an exchange then your sending wallet is almost certainly different to your receiving wallet, which will mean your swap will not work. To be safe do the swap from a private wallet - which of course means paying even more gas to move the tokens around 😔

🔔 🔔 🔔 Really quite a bit gotcha for the future

Of course if you do manage to get any rewards for mining NKN you’re going to have to swap from mainnet tokens back to ERC20 tokens in order to sell them on the open market. I haven’t tried that yet, but it’s fair to assume there’ll be a minimum of 100 NKN on that swap too, probably plus some fees, plus THE SWAP TOOL ONLY WORKS IN THAT DIRECTION FOR TWO WEEKS OF EVERY TWO MONTHS AND THE DATES AREN’T ANNOUNCED. So who knows if you’ll ever be able to get your money out. If all of that isn’t enough to put you off then read on…

🌍 Where to put your nodes. An experiment…

To maximise your mining rewards you want to set up a node somewhere it gets lots of traffic. I decided to do a test, by using some free Azure credits to set up mining nodes in different Azure regions. I’d let the nodes run for two weeks, look at the costs they incur, see which nodes earned the most rewards and decide whether it made sense to deploy them for real.

After some experimentation I found the azure B2s instance size to be sufficient. Each B2s instance should burn through about £22 of Azure credit per month. My budget of free credits is £113pcm, so I decided to set up four nodes. Arbtrirarily I chose the following regions:

  • UK South
  • Europe West
  • US East
  • US West

If you’re running the same experiment on Azure then you’ll need to use fixed IP addresses, switch off auto-shutdown on your VMs and allow inbound traffic on ports 30001 - 30005.

Deploying the VMs and running the nknx scripts is the work of moments. Once the nodes are running you should be able to check their status using the nStatus tool. You’ll probably see they’re in the WAIT_FOR_SYNCING state, which means you need to transfer your 10 NKN fee to the node wallets before they’ll start mining. Once that’s done you should see your nodes move to the SYNC_STARTED state. The sync took about 24 hours on my nodes, after which the nodes moved to the PERSIST_FINISHED state, which meant they were in business 💰.

In the next post we’ll look at keeping an eye on our NKN nodes and determining which (if any) are making any money…


<< NKN: New Kind Of Network NKN Mining Dashboard >>

Long Fetch

[home] [rss] [all]

Latest posts

Beavertail Canoe Paddle I made a beavertail canoe paddle out of a plank of ash and paddled it down a river.

Springs and Neaps Trying to visualise the next 28 days of tides.

Home Tide v2 Getting even more in tune with the tides, by seeing them on the iOS lock screen.

Paulownia On paulownia wood, daughters of marriagable age, projects that last decades and water craft.

Home Tide Calm technology to show the tide and twilight on the iOS home screen.

Frequent topics

apps ash azure beavertail beeswax bio-resin bitcoin blockchain boats calm-technology canoe cedar coinbase compound dai daughters erc20 ether ethereum handplane home-screen home-tide homescreen instagram instrument ios journal kong lock-screen lockdrop lockscreen making metamask mining moleskine music neap-tides nkn p2p paddle paulownia pool-together projects sapele sea seeds smart-contracts spring-tides stand-up-paddle stories sup surf swift swiftui tides tom-wegener toys uniswap web3 widget woodwork xylophone