Pirate Bay and Showtime turned to forcing unknowing visitors to mine cryptocurrency, using computers rather than eyeballs on ads to generate money

With the continuing collapse in online advertising revenues, websites are turning to other methods to pay their hosting bills – including using visitors’ computers and phones to mine cryptocurrency.

It’s a controversial practice, with some likening it to running malware on visitor’s computers, but it is a potentially lucrative endeavour for websites. The downside is that at best it slows down visitors’ machines, and at worst it can also drain their batteries or send their electricity bills soaring.

BitTorrent search engine The Pirate Bay, and US video streaming service Showtime, are two sites that were discovered to be sending mining code to users. The former owned up, posting in mid-September that the code was “just a test” and that the experiment was being done with a view to removing all adverts from the site.

The latter removed the code on Monday, shortly after a user noticed it and specialist press began reporting. But it has yet to answer questions on why the code was there from the Guardian and other media organisations.

Cryptocurrencies, such as bitcoin and its successors, are backed by a system of “miners”, who race to be the first to solve tricky computing problems in exchange for a reward for doing so. The rewards are large – the bitcoin network, for instance, gives away coins worth $7m to miners every day – but to be in with a chance, miners need to gather an extraordinarily large amount of computing power.

Not only is it expensive to buy those computers, it also consumes a huge amount of electricity to run them. As a result, the most profitable mining companies often have access to cheap energy, or some other efficiency boost - one firm, based in Iceland, saves money by letting the country’s naturally cold climate cool its computers.

Website-based mining short circuits that: the electricity bills are paid by the visitor, but it’s the website that gets the reward.

“Gaming and video sites typically are more resource intensive, so it seems to make little sense to run a miner at the same time without having a noted impact,” says Malwarebytes analyst Jérôme Segura. “Having said that, many people who consume copyrighted content are perhaps less likely to complain about an under-par user experience.

“The question at this point is: how far can publishers push the limits towards a really bad user experience? You may be surprised that for many, this is not really a problem at all and that double dipping is, in fact, a fairly common practice,” he added.

In the long run, such practices may simply push more users to install adblockers, Segura noted. It’s just as easy to block mining as it is to block adverts, using much the same techniques. Segura said: “There’s no question that users are annoyed by a rollout that did not include their opinion, even though many were actually favourable to this alternate solution to online ads.”

Showtime did not respond to a request for comment.