Browser Crypto Mining Doesn’t Have to be Evil

Paul Bailey
Neutron Studio
Published in
3 min readJan 27, 2018

Just when you thought it was safe to compute again after the Spectre and Meltdown vulnerabilities, Crypto Mining in the browser is here to get us all! Several Youtube ads have been caught embedding Javascript miners in their code.

First let’s take a step back and define what the heck is crypto mining in the browser and why should I be afraid of it? If you don’t know what cryptocurreny is, you should do some research on that first. When you mine cryptocurrency you effectively use your computer’s CPU to generate that currency. You’re essentially printing money, but it’s costing you electricity and time which are valuable assets. You’re also making a bet someone else will want your fake computer money. You can print all the money you want, and if no one cares, then that sucks for you.

Certain cryptocurrencies lend themselves to being more easily mined, so a small piece of code put on a website could generate currency for that site every time you visit. More and more we’re seeing mining code slipped into ads and other hidden places around the web without your knowledge. This will cause your computer or phone to slow down because of extra CPU usage which in turn also drains your battery. All things considered, not the worst thing in the world, since it goes away when you close that site. Also in my experience, sites with lots of ads and autoplay videos take up just as much CPU. Just stroll over to “reputable” sites like cnet.com to see how long your laptop lasts when it’s open.

So mining cryptocurrency in the browser is just the latest annoying method to monetize your clicks. And just like ads, it can be be done the right way and the wrong way. Advertisements can be a very democratizing force because it often frees content. Crypto mining can be the same way. So let’s not totally block it or throw it out.

With my new app, Neutron64, I hope to use crypto mining in a more responsible manner. First, with Neutron64 you can pay for a subscription. However, for those without the means, you can turn on crypto currency mining. I’ve integrated Coinhive and for every 500 hashes you get an hour of usage with the app. You have total control of how your CPU is used and how much of it. In my testing, even with scaled back mining you can crank out 500 hashes pretty quick. My goal is not to make you mine constantly, but to let you build up enough credit for a months usage, in a few days.

Neutron64 is an example of how to use crypto mining in the browser ethically. Here are the principles which I came up with to make crypto mining in the browser ethical.

  1. Users must opt-in to mining.
  2. Users must have control of how much of their CPU can be used for mining.
  3. Default to a non-invasive amount of CPU when mining is enabled.
  4. Have features to automatically disable mining when on battery. (not available in all browsers)
  5. Offer other methods of payments for those who opt out.

Number 4 is a pain point since some browsers disabled this feature over privacy concerns. It would be great to get this feature back in another form that also secures privacy.

Hopefully other sites and apps can pick up these principles so crypto mining can be used ethically in the future and not become a trashy monetization method like advertisements have become.

--

--