Mining for XMR

CreativeApplications.Net is currently running an experimental mode for non-logged in users/non-members to explore alternative to ad-driven revenue by trading visitors’ CPU for an ad-free environment.

Using the service Coinhive, and inspired by Mario’s tweet, we have incorporated a JavaScript miner for the Monero Blockchain that is embed in our website when the users are logged-out. You, the visitor are currently running the miner directly in your Browser and mining XMR cryptocurrency for us in turn for an ad-free experience.

↑ Example scenario showing Safari browser using around 300% CPU on a quad core CPU.

To mine Monero, we have to calculate hashes with an algorithm called Cryptonight. This algorithm is very compute heavy and – while overall pretty slow – was designed to run well on consumer CPUs. There are solutions to run the Cryptonight algorithm on a GPU instead, but the benefit is about 2x, not 10000x like for other algorithms used by Bitcoin or Ethereum. This makes Cryptonight a nice target for JavaScript and the Browser.

Of course, when running through JavaScript performance still takes a bit of a toll, but it’s not that bad. The miner installed on CreativeApplications.Net uses WebAssembly and runs with about 65% of the performance of a native Miner. For an Intel i7 CPU (one of the fastest desktop CPUs) we see a hashrate of about 90h/s. A native miner would get to 140h/s.

We have currently set the crypto miner to operate at 80% capacity using all of the cores on your CPU. This means it will not completely overtake your CPU but you will notice significant speed drop if you are performing other tasks and the fans on your laptop/desktop will most certainly come on.

Finally, we get 70% of the average XMR that is generated. The 30% goes to Coinhive to operate the service and to (hopefully) turn a profit.

Since this is something quite new, and something that is unusual in the blogosphere, we will try to run this miner with as much transparency as possible.

Here are some recordings. We will update this page as we move forward with tests.

Two Weeks Later

↑ Crypto Miner results after 12 days of running, generating 0.50193 XMR (paid out) and 0.06716 XMR balance which in total is equivalent to around $50 USD

Notes 02/10/2017: We’ve made a number of tweaks to the miner since last update. First of all we have increased throttling to 50% meaning that only 1/2 of the resources will be used. While this affects miner’s performance, it will drain less resources for the visitor. Second, we have disabled the miner to run on mobile. We’ve had few reports that it drains the mobile battery pretty quick so that won’t do. We are also considering adding the panel in the sidebar to monitor/adjust performance. The option also includes reducing the number of cores used but this would need to be implemented via a cookie so the settings are saved for the next visit. We may include this if we decide to go with the miner for good. Finally, the miner has generated equivalent to around $50 USD for the last twelve days – hitting the 0.5XMR mark for the minimum withdrawal. The funds have now been withdrawn to the MyMonero wallet and currently staying there. The next step would be to trade/convert these to USD or other currencies. Also worth pointing out that this is about 30% more than what AdSense would generate, even with throttling at 50%.

We’ve also had an opportunity to talk to the users about their experience. Most concern or doubt has been around the concept of a website using computer resources in the background to monetise. While this may be conceptually problematic, technically it is not much different to ad networks collecting data or serving CPU demanding ads to the end user. Solving complicated math problems with the CPU feels a lot more ethical than acting as a bridge to an ad network that collects visitors data.

We are also considering some other improvements to how the miner is implemented on CAN:

– Keep the miner mandatory for logged-out users with option to reduce available resources.
– Investigate Battery API to automatically scale the performance of the miner dependant on whether the computer is plugged in or not.
Check of the tab is foreground and if not pause the miner (Firefox does this already).
– Separate pop-up if mine block is implemented to notify the user.
– Optional miner in the form of screensaver (see also below)
– Visitor minimum hash count to disable miner for visitor – ie you need to reach a specified hash count and the miner will be disabled on your next visits until set time – like a point system running in the background.

See also some very interesting discussion happening here after CoinHive blog update.

24 Hours Later

↑ Crypto Miner results after 24 hours of running, generating 0.03503 XMR which equivalent to $3.40 USD using the current exchange rate.

Notes (19/09/2017): After 24 hours of running the miner, we have generated (average) almost equal of earnings that Google AdSense would provide using basic functionality – ie serving semi-random and mostly irrelevant ads based on your search history/emails/etc without much optimisation. While this may not be “fantastic” we are nonetheless very satisfied with the results. This could definitely prove to be a great alternative to AdSense. At the same time, we are still way off from premium-advertising, ie when we are approached directly to promote events / products / etc. Also, we still have to consider that Google may start punishing or blacklisting sites that do this – to protect their own revenue. The test continues…

4 Hours Later

↑ Crypto Miner results after 4 hours of running, generating 0.00331 XMR which equivalent to $0.32 USD using the current exchange rate.

Notes (18/09/2017): After 4 hours of running the miner, the results are proving very promising – when compared to Google AdSense as a basic advertising revenue. Whereas AdSense can be a very powerful tool and generate 10x the revenue when non-defaults are applied, CAN does not exist to turn a profit or exploit or trick its visitors into clicking on ads. Instead, we believe we should be able to generate minimum that keeps the site going offering a fair solution. After 4 hours of running the miner, we have generated approximately $0.30 USD.


Last updated: 2 Oct 2017 – 11:08 GMT