Pirate Bay digs itself a new hole: Mining alt-coin in slurper browsers
Would you trade your CPU time and electricity bill for pirated content?
Bittorrent search engine and mortal enemy of intellectual property lawyers, The Pirate Bay, has upset the one group of people that actually likes it: its users.
That script looked suspiciously like a Bitcoin mining operation, using visitors' browsers to crash through hash calculations. And that wasn't far from the truth. The embedded code quietly mines a fairly new cryptocurrency called Monero. Coinhive offers an in-browser Monero miner so websites can embed the code in pages and make money from passing web surfers.
It's supposed to be an alternative to adverts, although we've heard, by way of anecdote, some web ads running the same sort of mining code in the background in browsers to earn a few extra pennies while pages are read.
The impact was noticeable and immediate, with Pirate Bay fans complaining on the site's forum about the enormous resource hog. "I was looking at a torrent page and suddenly all my CPU threads went 80‑85 per cent – something which usually only occurs when I'm encoding stuff," wrote one user on Reddit.
The mining script was placed on specific pages rather than across the site: it ran on search pages and category pages but not on the homepage nor individual torrent pages – ensuring the code got the most footfall.
Following the outcry, the Pirate Bay's admins put out a statement.
Digging a hole
It turns out that "a typo" caused the mining operation to try to eat up every available cycle, rather than the 20‑30 per cent usage that The Pirate Bay planned for. And the initial installation may also have worked on every tab instance, so if people had multiple Pirate Bay pages open at the same time, it killed their browser's ability to even walk downhill. Both issues have since been fixed.
Surprisingly, however, many netizens seem pretty content with The Pirate Bay leeching their computers' processing energy to make money – especially if it means getting rid of ads.
"If this can become a viable way to support the website without seeing porno I am in," wrote one user in response to the blog post, referring to the fact that the only companies that appear willing to pay a notorious copyright infringing site to advertise their services come from the adult industry.
"Do you want ads or do you want to give away a few of your CPU cycles every time you visit the site?" asked The Pirate Bay's admin.
Of course, being the individualistic bunch there are, most Pirate Bay users have adopted a different tack altogether: ad-blockers and other browser extensions that block the Codehive script.
Mining Bitcoin in a browser is now unfeasible: to get anywhere you need some seriously souped up computer gear or specialized dedicated mining equipment. Monero is only three years old, and still relatively easy to mine, especially on ordinary machines, hence Codehive's decision to go with Monero. One XMR is worth $101 (£74) whereas 1 BTC is $3,950 (£2,920), though.
Given that the site doesn't have to pay for people's electricity and hardware, and just milks them of crypto-cash, let's do some back-of-the-envelope calculations for Pirate Bay. Assuming:
- The average Pirate Bay user's browser running Codehive's script is capable of mining Monero at 30 hashes per second. A decent Intel Core i7 can do 90 per second in a browser. Your humble hack's Core i5 in a laptop can do 30. Let's just go for 30.
- The site attracts 200 million users a day, apparently, and half of those don't have some kind of script blocking in their browser, ie, there are about 100 million users crunching away at 30H/s for some period during the day.
- Let's assume they each spend just a minute on a mining page on the site, on average, a day. Some will stay on a mining page for a while, some will leave after a few seconds. That's, let's see, 180 billion hashes cracked a day in total, on average, or 2,083,333 a second over the day.
- According to this online calculator, that would cough up $123k a month – again, based on these almost random estimates we've come up with. We're willing to be way off the mark.
It's impossible to know for sure, and The Pirate Bay is unlikely to release figures about how profitable its mining approach is, once it's paid its hosting bills and expenses in XMR. But you can certainly see why it felt the idea was worth exploring – especially if it means the site can dump its ads and its users seem to accept the trade-off of free content in return for involuntarily donating their CPU cycles.
So long as Pirate Bay users don't go ballistic and threaten to boycott the site altogether, perhaps the best measure of whether the mining operation is profitable will be to see if the organization continues to implement it past its "test."
If it does, you can expect to see many more sites switch to Monero mining in their browsers. Online and off, nothing speaks louder than money. ®