Due to this fundamental profitability problem with browser-based mining, it soon withered away. However, the idea was once again revived in December 2013 by a group of MIT students in a project called Tidbit—ostensibly touted as an alternative way for website owners to raise revenue. Once again, this project didn’t last long, as soon after it started the New Jersey Division of Consumer Affairs stepped in to investigate the fledgling company on charges of unlawful access to "a person’s computer processing power." This resulted in a long drawn out case which was finally settled in 2015.

The case for browser-based mining wasn’t looking good. The growing problem of profitability was made even worse by the increasing use of ASIC miners. The advent of ASIC miners dragged bitcoin mining out of the realm of home users and into an industrial age dominated by the massive mining farms that we are more familiar with today. After the demise of Tidbit, the idea of browser-based JavaScript cryptocurrency mining largely died away once again.

Despite these setbacks, key lessons were learned. The point of a service like Tidbit was never about single servers or high-end computers doing solo mining. The true power of this service came from scaling up and pooling the potentially massive combined mining power of masses of users with average hardware visiting a website. Higher website traffic means higher returns and sooner or later, somebody was bound to figure out a better way to get browser mining to work on end users' computers more efficiently.

Dawn of the dead

Fast forward to September 2017, the cryptocurrency landscape compared with 2013 had changed drastically. In April 2013, the cryptocurrency market only had a handful of coins and the total market capitalization was just $1.5 billion. The market for cryptocurrency was extremely limited and illiquid, meaning that even if you got some, it was not easy to turn it back into fiat currency for spending. Contrast that with September 2017 when the market capitalization stood at an incredible $166 billion spread over more than a thousand different coins.

Together with the diversity of coins to choose from in 2017, there was also now a diversity of coin reward mechanisms. Some, like Bitcoin, can still only be mined via a proof-of-work (PoW) process using dedicated power-hungry ASIC hardware—though there have been attempts to change this, with the various hard forks such as Bitcoin Gold (BTG) and Bitcoin Diamond (BCD), to bring in GPU mining. Other cryptocurrencies like Monero, Ethereum (ETH), Ethereum Classic (ETC), and Dash (DASH) can be mined using retail-grade GPU hardware found in many home computers. There are also some that are more suited to CPU mining; these include Monero and Verium Reserve (VRM). The trading environment is massively different too; it’s now much easier to move between fiat currencies and cryptocurrencies, making the latter more useful and valuable.

It's against this backdrop that Coinhive released its browser-mining scripts designed to mine Monero, effectively bringing the idea of browser-based mining back from the dead.

News spreads fast

Coinhive is marketed as an alternative to browser ad revenue. The motivation behind this is simple: users pay for the content indirectly by coin mining when they visit the site and website owners don't have to bother users with sites laden with ads, trackers, and all the associated paraphernalia being downloaded to the browser. Users hopefully then get a cleaner, faster, and potentially less risky website (remember malvertising?) to use, and everybody is happy. What could go wrong?

Soon after the release of the Coinhive service, the hash rate for the service started to climb, and quickly too. Hash rate is the number of hashes calculated by the combined power of the mining pool and is measured in the number of hashes per second—usually in units of millions (MH/s). Hashing is the process of carrying out cryptographic hash calculations which are used to help process transactions. Miners who participate in a mining pool get paid a share of income generated by the pool.

According to a blog by Coinhive, the hash rate for their pool climbed from 0 MH/s to 3 MH/s in a couple of days before reaching 13.5 MH/s in the space of a week. To put that into perspective, the total network hash rate (the total amount of mining power for all computers mining) for Monero stood at around 260 MH/s on September 20, 2017. The Coinhive pool reached just over five percent of that total which is quite an achievement in such a short time.