Using Coinhive with any Mining Pool

I recently tried out of it was possible to use browser visitors with the coinhive webassembly miner with any mining pool and it works with projects like coin-hive-stratum.

Disclaimer: I don’t know if that’s intended by the coinhive developers, since they’re basically being profitable with people using their miner with their pool, but I was curious if it worked 😉

Coinhive Payout Model

Coinhive has a slightly different reward / payout model than other pools. You will actually be paid based on million hashes submitted to the network: payment FAQ.

Usually with mining pools your work will be included in the overall work done and then when a block is found, you’ll be rewarded based on how much work you contributed. With Coinhive, you kind of get paid without having to worry about if the pool finds anything or not.

At the time of writing the payout is:

current payout 0.00005530 XMR per 1M hashes
(difficulty: 71.712G, block reward: 5.67 XMR, payout: 70%, updated: Jan 8, 2018 – 07:03:48)

I imagine that value is adjusted automatically to ensure Coinhive stays profitable. In a way that makes it very transparent and easy to see how much you’re probably going to make.

The payout minimum has been lowered to 0.02 XMR (previously 0.05 XMR)

Which is much lower than most mining pools at the moment. Usually minimum payouts are around .3 XMR which at the time of writing is around 150 USD.

Coinhive and Ad Blockers

Ad blockers usually block all scripts loaded from coin-hive.com / coinhive.com and even authedmine.com, but technically you can name the script yourself and make requests to a proxy that acually either establishes websockets to Coinhive or your own mining pool.

If you’re running a miner with user consent (the way it’s supposed to be), you might take that into consideration to circumvent some overly protective ad blockers.

In a way it’s a shame that Adblockers aggressively target miners when the user actually allows them, but obviously it’s hard for them to detect if the dialogue display, sufficiently informed the user of what’s going on.

Coinhive Stratum Proxy

The proxy I found is written in node / Typescript and fairly easy to set up. It has a built in donation, which is not too hard to disable / adjust.

If you want to run it with an SSL cert, you can use Let’s Encrypt, which is super easy when you deploy it to dokku or similar.

Note that you’ll need some kind of VPS or other hosting setup to run the proxy successfully.

If you for some reason prefer to point the web clients to a Monero mining pool of your choice, give coin-hive-stratum a shot.

Leave a Reply

Your email address will not be published. Required fields are marked *