Recently, ThePirateBay(a known torrent site) had gotten called out, for making their traffic mine bitcoin or other currency via JavaScript. This had sparked my interest with the idea of browser based mining, and how it can be done.

The Non-Shady Concept

You visit your favorite blog(damnit, this means it’s not mine), and find roughly three advertisements on each page. Grrrr, seeing advertisements is annoying, and can even ruin the design/feel of the site.

The people running the site both deserve to get paid, and will keep up their ads, unless something better comes around. Well, it’s here.

Imagine, giving up 10% of your CPU power to mine for the creators wallet address, instead of seeing ads. Yes. Please.

The Downside

Yeah, in concept this thing sounds flawless. While browsing the web, you surely will have at least 10% to spare. Right?

Maybe not. Let’s say you’re a tech-savy video specialist, attempting to render out a new project, refresh your email, browse the web, play music, download the newest bitcoin wallet block, and take a sip of coffee at the same time.

Yikes. You most likely don’t have 10% of your CPU to share. Loading up the page, and having the JS based miner start(without and heads up), will cause the innocent video specialist’s machine to struggle, and possibly even crash some of his precious applications.

Odds are, this won’t be happening. I guess it really depends on the type of traffic your site is receiving. This is up to you to figure out.

But, How Do I Do It?

I asked around in three crypto related Discord servers, and finally found an insanely easy answer.

CoinHive, is a free, easy-to-use JavaScript based miner. Implementing it is a simple copy and paste(to my surprise), and even comes with some nice spam protection. At the moment, they only have support for Monero. Monero is also the #1 currency for anonymization, and seems to have a great concept behind it. Holding some doesn’t sound like a bad idea.

I really wish, I could stretch out this article and go into detail about how to install it. But, it’s easy, and if you have any issues with it check out their docs.

In Conclusion

Depending on the type of site you run, JS based mining applications like CoinHive, may be a good alternative to advertisements. Don’t be afraid to try it out for yourself, it’s free, and incredibly easy to use.


0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *