bitcoin Bitcoin
ethereum Ethereum
polkadot Polkadot
ripple XRP
Show details
Is In-Browser Mining a Good or Bad Use Case for Cryptocurrency?

Can In-browser Cryptocurrency Miners Be Less Evil?

Reading Time: 6 minutes by on April 2, 2018 Altcoins, Commentary, Mining, News, Tech
Follow by Email

Some people believe cryptocurrency mining is a great alternative to ads on a website. Some don’t mind losing 10-40 percent of their CPU power over it. This article will explain why these perspectives are erroneous. It will also propose a method to address most of the concomitant caveats by allowing browser miners to become a supplementary source of monetization, which may have a favorable effect upon the online ecosystem.

For the record, a miner is an application that mines cryptocurrency. It can be embedded in a website and harness the power of a visitor’s processing unit or graphics card.

What Makes a Miner Evil?

The following reasons might be obvious to many, although the aficionados of mining tend to disregard them.

  1. When a user purchases an expensive processor or graphics card, they usually don’t plan on allocating half of its cores to mining. Let’s suppose you’ve spent $600 to buy a new processor. If miners eat up half of its capacity, consider $300 wasted. In case you buy a cheap processor or graphics card, this issue is yet more relevant because you’ll need all of its resources.
  2. Mining campaigns run by unscrupulous operators may affect the responsiveness of the hosting website, other websites currently opened in the browser, and even the whole system. However, even if you are a white hat miner, consuming only a part of the visiting machine’s resources is still cold comfort for the user – here is why:
  • It doesn’t necessarily eliminate the likelihood of performance deterioration.
  • If the user has opened several tabs and several websites are mining at the same time, they will cause system overload anyway. In case hundreds of tabs are currently opened, such a scenario is very plausible.
  • An overload is also imminent if the user launches some additional programs.

Lags caused by mining are difficult to control. As a user, you would rather refrain from opening such a website than deal with lags. The problem is, you don’t always know there is a miner running, most of them try to hide.

  1. A website may simply diminish my computing experience if it runs a mining script without letting me know. For instance, if you use an eight-core processor, some of these cores will probably be idle most of the time, but there will be periods when all of them should be engaged. Here’s a simple example; you’ve decided to watch a movie but couldn’t do it because of a miner. Moreover, no matter how powerful your computer is, the miner will eat up its processing capacity and slow it down anyway.
  2. Essentially, mining is a conversion of electric power into money. A surreptitious miner, therefore, actually steals my money as you’re the one who has to pay the electricity bill.
  3. Miners cause battery drain.
  4. A miner cannot check whether the sites opened in other tabs are running miners too. Consequently, by opening a few tabs, you may cause the system to slow down to a crawl.
  5. A certain amount of spare processing resources is usually required for the system to run smooth. A miner cannot gauge the amount of this spare power at any given time.
  6. Miners cause fan noise.
  7. Miners tend to operate surreptitiously. If you visit a website that has too many ads on it, you can just close it and go to another one. You don’t have that choice with miners.
  8. Inexperienced users may find it hard to figure out why their system is lagging.
  9. If you have realized that a miner is to blame for inconveniences, it’s extremely burdensome to spot the troublemaking browser tab. Things are yet worse if you haven’t understood that a miner is a culprit.
  10. Miners can cause a laptop or smartphone to overheat.
  11. Financial issues are part of the equation as well (see below).

Long story short, miners cause system lags, steal money through unauthorized electricity consumption, deteriorate user experience, discharge the battery, make the fan noisy and overload the system when several tabs are opened. To top it off, miners – unlike ads – act furtively and thus take the prerogative of choice away from the user.

Financial Issues

  1. If all webmasters started embedding miners on their sites, their revenue would decrease because users’ resources are limited. Revenue over in-browser mining is very small at this point, but what if it further drops, say, tenfold? Meanwhile, users continue to encounter critical inconveniences.
  2. The gap between revenue and the cost of electricity used. For example, some people may mine $1 worth of cryptocurrency while spending $2.
  3. The productivity caveat. It isn’t very likely to be relevant, though, because JavaScript code can mine via graphics card using shaders written in GLSL (OpenGL Shading Language). When it comes to mining via CPU, the target cryptocurrency is tailored for this particular type of mining, where the graphics card scenario is either impossible or inefficient. We can optionally use WebAssembly to accelerate the mining process via CPU.

Environmental Concerns Coming to the Fore

The cost of electric power used to matter a lot to the operators of mining campaigns. Therefore they didn’t engage in this activity unless they got the bang for their buck for sure. However, as the mining job and all the expenditures have shifted toward the end user, miners don’t have to worry about cost efficiency anymore. This will inevitably lead to a rapid increase in electricity consumption volumes.

Tackling Some of the Problems

The issues related to system lags, user experience deterioration, sites opened in several tabs mining concurrently, and spare resources sufficiency can be addressed by means of programming tweaks. For instance, every second we can perform a 100 percent test load lasting a fraction of a second and check how many calculations have been successfully completed.

The problem of battery drain can be resolved via a response from the web browser whether the device is plugged into an electrical outlet.

It could be possible to address the issues of fan noise and overheating by defining a threshold in the browser regarding the maximum amount of resources to be engaged in the system. Websites should abide by this restriction. The flip side is that this configuration may be used to track user activity.

Universal Solution

It’s possible to take care of all the issues in one shot by mandating web browsers to blacklist sites running miners that don’t meet the criteria below:

  1. A miner should leave at least 50 percent of spare resources regardless of the current system load. It shouldn’t run at all if the system is already 50 percent loaded.
  2. A miner should notify the browser of its activity. The browser will display an appropriate icon in the URL bar and on the tab proper, similarly to how it’s currently done with audio content.
  3. A miner shouldn’t work if the user has disabled mining for all sites or the current one.
  4. A miner shouldn’t run when a device uses battery.

Of course, even if a website is blacklisted the user should be able to visit it after viewing an appropriate warning message. Search engines can act accordingly and rank such websites lower in their search results.

A serious hurdle to implementing this method is that it’s very labor-intensive and time-consuming. Another downside is that the fan noise issue isn’t addressed. Also, this type of solution does not take care of financial and environmental problems.

Advanced Workaround

A more sophisticated tactic is to build the cryptocurrency mining feature right into the web browser. This way, the browser will automatically check whether all of the above-mentioned four requirements are met, and the user will not encounter any inconveniences. All that’s left for a site owner to do is to simply specify which cryptocurrency to mine.

The Pros

  1. All built-in miners will be flagged potentially unwanted. Therefore, it won’t be any harder to spot them than it is now. Speaking of the previously suggested method, this type of flagging routine is complicated.
  2. We may achieve better performance. There is no competition between mining applications right now, but things may change.
  3. The fan noise issue is finally resolved because the productivity configuration is now saved within the browser and isn’t delegated to websites, which means it cannot be used for tracking purposes.
  4. Easy setup for a website owner.

Meanwhile, browsers don’t necessarily have to block unwanted sites on their own. Instead, this job can be outsourced to third-party products, such as anti-malware suites or add-ons.

The Cons

This workaround also has a few significant stumbling blocks.

  1. It is very labor-intensive to implement on the browser’s end. In particular, this caveat applies to handling different mining applications for different cryptocurrencies. On the other hand, browsers can get additional monetization by promoting specific cryptocurrencies.
  2. It is still impossible to get around the issue where the profit gets extremely low if everyone starts mining. It means browser vendors will have to do tremendous work that may end up worthless for the web.
  3. There are plenty of caveats regarding the spare resources issue. As a user, you’re better off disabling the mining feature. Nevertheless, having toggled the overall mining off, you can still enable it for your favorite websites, which will keep them competitive.
  4. The profitability of mining is very unstable. There aren’t many enthusiasts willing to implement a technique whose efficiency is doubtful.
  5. None of the above-mentioned financial issues is addressed.
  6. The environmental concerns persevere as the consumption of electric power will increase multiple times compared to what it is now – mining operators simply won’t care about saving energy. In fact, by endorsing miners, we support pointless waste of energy.

The Bottom Line

Although the above workaround has got quite a few serious drawbacks, most users should be okay with it as they can simply disable the mining feature via browser settings if they don’t want it. Those who advocate mining, though, usually ignore the concomitant issues and ways to address them, thus pushing this economy forward at the expense of regular users’ experience.

A few more noteworthy things are as follows:

  • Web browsers have already started throttling CPU usage by background tabs. However, when a lot of background tabs are opened the load will be tangible anyway, so it’s not really a full-fledged protection mechanism.
  • It could be a good idea to completely disable GPU usage by background tabs except for approved sites.

However, both of these techniques are barely effective if there is more than one active tab. This is a likely scenario when several browser windows are opened. Last but not least, the opinions expressed in this article are subject to discussion, so any feedback or alternative ideas are welcome.

Like BTCMANAGER? Send us a tip!
Our Bitcoin Address: 3AbQrAyRsdM5NX5BQh8qWYePEpGjCYLCy4
Join our telegram channel