Coinhive is a Monero (XMR) miner that runs on users’ web browsers when they’re visiting certain sites (don’t worry, we don’t employ this on 99Bitcoins). Recently, The Pirate Bay and CBS’s Showtime were busted for running Coinhive on visitors’ browsers without their knowledge or consent.
Before we get into a discussion about how to use Coinhive to monetize your content, let’s first discuss why website owners might want to use it instead of the tried-and-true method of online revenue generation: ads.
The Rise of Ad Blocking
Software that blocks online advertisements—usually referred to as an ad blocker—is rapidly becoming the standard. According to PageFair, a company dedicated to analyzing and mitigating this trend, about 615 million devices were using ad blockers at the end of 2016. The total number of internet users in mid-2016 was estimated to be 3.4 billion. This means that around 20% of users employ ad blockers.
Because most ad blockers are free and easy to install, there are no immediate downsides—and plenty of upsides—for their users. The most popular ad blockers include Adblock Plus, AdBlock, and—my personal recommendation—uBlock Origin. Origin includes a filter for Coinhive to deny websites free access to your CPU’s mining power.
In addition to blocking ads and trackers via ad blocking methods, particularly proactive users may opt to go on the offensive with AdNauseam. This browser plug-in not only blocks ads but also spoofs clicks on them, generating false traffic to the detriment of advertisers’ conversion rates and thereby wasting their advertising budgets. The credibility and effectiveness of online advertising, in general, has been called into question lately by major companies such as Uber.
Because the current business model of the internet is largely based on advertising, ad blockers and the apparent decreasing impact of regular online advertising are forcing advertisers to adapt or go broke.
Cryptocurrency as the Solution
Because cryptocurrency is “the internet of money,” it will likely prove to be a better way to monetize the internet.
The Brave Browser is one attempt at a solution. Brave automatically blocks ads, or at least replaces them with privacy-respecting ads. Brave allows users to earn small amounts of bitcoin if they opt in to viewing these “good ads.” Brave also lets users fund participating websites by automatically allocating bitcoin donations based on the amount of time they spend on each site. Brave is improving quickly, and it will hopefully soon incorporate Lightning Network micropayments.
Coinhive presents a more straightforward approach to content monetization. The integration of the Coinhive script into a website gets the CPUs of cooperative visitors to mine Monero. All proceeds are split between the site’s chosen Monero address and the Coinhive creators, who receive 30%. This is a fairly large cut, but an open-source version known as Harvest, which will allow site operators to retain the full proceeds of mining, is likely coming soon.
Depending on the number of visitors a site receives and the time those visitors spend on the site (and the XMR price and mining difficulty), profits from Coinhive may allow a site to forego other monetization options such as ads, paywalls, donations, and subscriptions.
Coinhive web mining modes:
1) As a Proof-of-Work “Captcha” that performs a set number of hashes or as a continual process. Unlike a regular captcha, this mode is unable to distinguish humans from bots. However, it is effective at rate-limiting actions, and it represents a great DDoS or spam countermeasure. Provided the cost of the mining is higher than the reward for spamming, bots will have no economic incentive to target a website.
2) As an automatically redirecting Proof-of-Work shortlink using the cnhv.co prefix. The number of required hashes will determine the degree of delay before the shortlink redirects, although the time value will vary according to the CPU power of users.
Shortlinks are especially useful for sharing links over social media, particularly on Twitter due to its limited character space. Here’s an example, which redirects to the Wikipedia entry for Monero: https://cnhv.co/6bk.
Tip: The new Coinlink site allows anyone to earn XMR by creating and sharing a Coinhive shortlink.
3) As a continual mining process. This mode is optimal for sites on which users spend a lot of time doing things such as browsing content, reading articles, watching videos, or playing games. Here are some examples of sites that have implemented this method:
- Windscribe, a VPN service, uses Coinhive to let users earn account upgrades and bandwidth.
- The Defeating Aging site uses the web miner to generate charitable donations to the SENS Research Foundation.
- A college professor set up a simple web mining page for anyone who wants to contribute hashes to his Tesla fund.
- Faucets that pay out in Bitcoin and Monero based on XMR mined are available.
Coinhive’s flexible code allows for nearly unlimited creativity when it comes to implementation.
Web mining via user browsers
Continual mining, or web mining, is by far the most profitable approach. If a site is able to retain numerous miners’ time, it can expect to earn a decent amount of XMR. Approximately 0.3 XMR, or $30 per month, is estimated for between 10 and 20 steady miners.
Note that the level of CPU usage is customizable. CPU usage should be set at a reasonable level, or it will noticeably slow down users’ devices and cause them to abandon a site.
Coinhive web mining should also be announced to site visitors to prevent any backlash or malware accusations. Ideally, web mining should be an opt-in process. Laptop users may be particularly aggravated by a site that surreptitiously drains battery power through mining. Configuring the miner to halt on low battery power could avoid a lot of PR difficulty.
An open-source plug-in is also available for Coinhive in WordPress. This can be configured to start automatically and run without any widget’s being visible.
Why Mine Monero?
If you’re wondering why there’s nothing similar for Bitcoin, it all comes down to Monero’s ASIC-resistant algorithm, CryptoNight. This algorithm ensures that, unlike Bitcoin and most other cryptocurrencies, Monero can be mined more or less profitably on the average desktop or laptop CPU. While mobile devices can also mine Monero (and run Coinhive), they’ll produce a very low hash rates.
If you’re interested in directly mining Monero, be aware that Coinhive’s 30% cut and the inefficiency of JavaScript CPU-mining (65% of a regular CPU miner) make it an unprofitable option. GPU mining on a reputable Monero pool (avoid Minergate) will net far superior results.
Advantages of Coinhive
- It’s easy to implement and configure on most sites.
- It respects user privacy and allows sites to do away with tracker ads and the like.
- It is entirely unobtrusive and doesn’t interfere with the design or user experience of a site in any way.
- It achieves the best results when run over long periods of time, incentivizing sites to produce high-quality and engaging content rather than the clickbait model incentivized by ads.
- It is fairly transparent; compare the pool’s mining results to your data to verify the results.
- It will serve to introduce new users to cryptocurrency.
Disadvantages of web mining
- It’s already blocked by many updated ad blockers (and all JavaScript blockers), and certain antivirus programs also flag it. Site owners will have to request that certain users manually enable web mining in instances where it’s required to access content.
- Unless a site is popular and enjoys high retention rates, it’s unlikely to earn much revenue from web mining.
- If not properly configured for older CPUs and mobile devices, web mining can slow down users’ devices.
- There’s a high potential for abuse by malware developers and unscrupulous operators.
99Bitcoins may receive advertising commissions for visits to a suggested operator through our affiliate links, at no added cost to you. All our recommendations follow a thorough review process.
Free Bitcoin Crash Course
- Enjoyed by over 100,000 students.
- One email a day, 7 days in a row.
- Short and educational, guaranteed!
Why you can trust 99Bitcoins
Established in 2013, 99Bitcoin’s team members have been crypto experts since Bitcoin’s Early days.
Weekly Research
100k+Monthly readers
Expert contributors
2000+Crypto Projects Reviewed
I have been using Coinhive on my popular site (25,000) month views and over 3 months earnt £00.0007 nearly 1 thousandth of 1 penny. so I’m dropping it as a bad idea.
Hi Lojanus,
That does sound very low. I’m sorry it didn’t work out for you. What settings were you using for Coinhive?