What is Coinhive?


Spam Protection

Rate limit actions on your site

Link Forwarding

Monetize shortlinks to your content


In-Game Money

Offer rewards in your online games

Ad-Free Content

Run your site without ads

Coinhive offers a JavaScript miner for the Monero Blockchain (Why Monero?) that you can embed in your website. Your users run the miner directly in their Browser and mine XMR for you in turn for an ad-free experience, in-game currency or whatever incentives you can come up with.

Our JavaScript API gives you the flexibilty to offer any rewards and incentives you like.

We also offer a captcha-like service as well as a shortlink solution that is easy to implement on your site. These services, while fully supported, should only serve as an example of what's possible.

We are excited to see how you will use our service. We dream about it as an alternative to micro payments, artificial wait time in online games, intrusive ads and dubious marketing tactics.

Your users can “pay” you with full privacy, without registering an account anywhere, without installing a browser extension and without being bombarded by shady ads. They will pay you with just their CPU power.

posted on August 31, 2018, the Coinhive Team

What's Happening with the Payout Rate?

We have gotten a few emails about the sharp decline of our payout rate recently. It's not intuitive that our payout rate per hash would decline, while prices for Monero are falling as well. We'd like to explain in detail what exactly is going on.

If you know a bit about Mining in general, you can skip over the first few paragraphs.

Mining Cryptocurrencies

The way Mining for Monero and other Cryptocurrencies works is that you try to find a solution to a mathematical problem. The problem is entirely artificial: find a hash value that has n leading zeroes with the the last block as one of the inputs. For Monero, the solution is tested with a hashing algorithm called CryptoNight. Since there is no way to go back from a particular hash to the input value, you have try to find a solutions by brute force.

CryptoNight(last_block_hash + nonce) = new_hash

The objective is to find a valid new_hash – a hash that has a certain number leading zeroes. The last_block_hash value is fixed. The only thing you are allowed to change is the nonce. A miner will randomly test different nonce values until it finds one that produces a valid hash. If you find such a hash, you are allowed to create the next block in the blockchain and will earn a reward.

If, in the meantime, another miner has found a valid hash and has created a new block, you have to start over with a new last_block_hash.

The number of leading zeroes your hash has to have is called the difficulty. The more leading zeroes that are required, the more random nonce values you have to try.

Monero is tuned so that on average the whole network of all miners worldwide will find a valid hash every two minutes. If there are more miners participating they collectively can test more nonce values in this two minute span. Monero therefore adjusts the difficulty to keep this block time constant. That is: more miners = higher difficulty.

How We Calculate The Payout Rate

Coinhive pays you per hash. The payout is the same wether the hash is a valid one (satisfies the difficulty) or not. The payout is also independent from the actual number of blocks we can create and the rewards we earn.

Instead, the payout rate is based on the mathematical average of the reward that we should earn. We don't adjust this rate by hand. It's re-calculated every few hours, based on the current difficulty of the Monero network and the average block reward.

payout_rate = (hashes / global_difficulty) * block_reward * 0.7

This is somewhat different from a traditional mining pool that will only pay you if they really find a block.

What Happened In The Last Few Days?

Typically, the more popular a Cryptocurrency gets, the higher the price for it will get and the more miners will be attracted. Remember: more miners means a higher difficulty.

In the last few weeks, the price for Monero has risen quite a bit…

Monero Price

…but so has the difficulty

Monero Difficulty

Notice how in the last few days the difficulty continued to rise, while the price per XMR declined sharply. The truth is that all Cryptocurrencies have fallen in value quite a bit in the past few days. Monero is no expection.

The miners however are here to stay. Many people have invested greatly in mining hardware and they continue to mine Monero even when the prices fall. It's unlikely that the difficulty will decline anytime soon.

If we calculate the payout per hash in terms of USD value, you can see that we payed quite a bit more in Nov.-Dec. 2017 than we did in Sep.-Oct. 2017.

Coinhive payout in USD

So, while our payout rate in XMR has steadily declined since we launched Coinhive back in September 2017, the USD payout has actually increased for the most part. Now, with the falling prices of Monero, we're back at Oct. 2017 levels.

As you can see, the payout rate is not entirely in our hands. Yes, you're earning less right now than you did a month before, but so do we. We're all in the same boat. Of course we cannot predict the future, but if we have learned anything from the past, it's that prices will rise again.

Don't panic.

posted on February 01, 2018, the Coinhive Team

Payments To Exchanges & Lower Fees

One of the most confusing aspects of Monero has been the payment address and receiving payments. Today, we're making things a bit simpler.

Here's a bit of background:

Monero addresses come in two flavors: plain addresses and integrated addresses. Plain addresses consist of 95 characters and integrated addresses are 106 characters long. If you set up a proper Monero wallet, such as the full wallet from getmonero.com or if you're using the web wallet on mymonero.com, you will have a plain address. Integrated addresses in turn are mostly used by exchanges, mobile apps or other web wallets.

For wallet providers, setting up and managing a proper Monero wallet for each of their users is quite complicated. So most wallet providers only create a single wallet for all their users. When a payment is made to this wallet, the provider looks at the payment id for this payment. With this payment id, the provider can associate the payment with a single user, even though all payments are internally made to the same wallet.

Historically, the payment id could be provided in a separate field. So to receive a payment, you'd have to enter your plain Monero address (the address of the provider) and a payment id. This led to many users entering the address and simply forgetting or ignoring the payment id. The payments were made to the wallet provider, but the wallet provider could not associate it with a user on their platform.

To prevent this, the idea of an integrated address was established. An integrated address consists of a plain Monero address and a payment id combined into a single 106 character string. With this, users simply need to copy a single piece of information, making it way less error prone.

What held us back from supporting integrated addresses for so long, was the fact that payments made to them could not be batched. Each payment to an integrated address needs to have its own transaction. It cannot be bundled together with other transactions. This means that transaction fees are a bit higher than usual.

Now we're giving our users the option to use integrated addresses by asking for a small transaction fee (0.005 XMR) for each payment.

There are still some exchanges and wallet providers out there that do not accept integrated addresses and still require a separate payment id. We do not support separate payment ids. It's an outdated and error prone way to do payments.

If your wallet provider still requires a payment id, please ask them to upgrade to integrated addresses. It makes all our lives a bit easier.

The second change today is the reduction of our minimum payout and fee. With the recent price rise of Monero and the higher mining difficulty of the network, it was getting harder and harder for our users to reach the minimum payout. So we cut the payout minimum and fees in half.

As we have said before, we do not want to hold your money hostage. We want you to recive and use the Monero that you have earned.

Happy Holidays!

posted on December 21, 2017, the Coinhive Team

Library Improvements and Best Practices

We have implemented some improvements for our JavaScript API and the Simple UI to help you deliver a better experience for your users.

The JavaScript API has gained two new methods: miner.isMobile() to check if the user is on a phone or tablet and miner.didOptOut() to check if the user did cancel the opt-in screen in the last few hours.

Mining on mobile devices is quite slow and it also drains the battery quickly. So to be more user friendly, consider to disable mining on mobile devices completely. Also, if the user cancels the opt in, you probably don't need to show it again on each new page load. You can achive both now with a simple if:

// Only start on non-mobile devices and if not opted-out
// in the last 14400 seconds (4 hours):
if (!miner.isMobile() && !miner.didOptOut(14400)) {

For the Simple UI you can now listen on all miner events, just like for the JavaScript API. See the documentation for the details.

posted on November 01, 2017, the Coinhive Team

Security Incident - DNS Breach

Tonight, Oct. 23th at around 22:00 GMT our account for our DNS provider (Cloudflare) has been accessed by an attacker. The DNS records for coinhive.com have been manipulated to redirect requests for the coinhive.min.js to a third party server. This third party server hosted a modified version of the JavaScript file with a hardcoded site key. This essentially let the attacker "steal" hashes from our users.

No account information was leaked. Our web and database servers have not been accessed.

The root cause for this incident was an insecure password for our Cloudflare account that was probably leaked with the Kickstarter data breach back in 2014. We have learned hard lessons about security and used 2FA and unique passwords with all services since, but we neglected to update our years old Cloudflare account.

We're deeply sorry about this severe oversight.

We're looking for ways to reimburse our users for the lost revenue tonight. Our current plan is to credit all sites with an additional 12 hours of their the daily average hashrate. Please give us a few hours to roll this out.

posted on October 24, 2017, the Coinhive Team

Lower Minimum Payouts

We have received a lot of criticism for our minimum payout threshold. Many of our users deemed it as far to high. If you had a small website without much traffic your money would be essentially locked up on our servers for a long time.

We don't want to hold your money hostage - the truth is simply that the transaction fees in the Monero network are quite high. So far, we have paid all these transaction fees out of our own pockets.

Today we're offering a compromise: we're giving you the option to configure a lower minimum payout (down to 0.05 XMR) and in turn charge 0.01 XMR for each transaction below 0.5 XMR. Head to your payment settings if you want to set a lower minimum payout for your account.

All payouts at or above 0.5 XMR will of course continue to be free.

posted on October 20, 2017, the Coinhive Team

AuthedMine Localization

That was fast. Yesterday we asked we our users to translate the AuthedMine opt-in screen into other languages. Today, after 354 edits from 303 users we can proudly add support for 54(!) languages. We are very grateful to have such an amazing community.

You don't have to do anything to use the localized version of the opt-in screen. Our system will automatically select the right language based on the user's accept-language setting.

If you want to force a specific language, you can use the language property with the ISO 639-1 code. We also added an optional "dark" theme for the opt-in screen. See the Constructor Options documentation for the details.

Here's the full list of languages: Abkhaz, Afrikaans, Albanian, Arabic, Basque, Belarusian, Bosnian, Brazilian Portuguese, Bulgarian, Catalan, Chinese, Croatian, Czech, Danish, Dutch, English, Esperanto, Estonian, Finnish, French, Georgian, German, Greek, Hebrew, Hindi, Hungarian, Indonesian, Italian, Japanese, Korean, Latvian, Lithuanian, Malay, Marathi, Norwegian, Norwegian Bokmål, Norwegian Nynorsk, Ossetian, Persian, Polish, Portuguese, Romanian, Russian, Serbian, Sinhala, Slovene, Spanish, Swedish, Tamil, Thai, Turkish, Ukrainian, Vietnamese, Yoruba.

If your language is missing or you see an error with one of the translations, please suggest an edit. If you edit an existing translation, please state in the comments what exactly you changed and why.

Thank you for your contributions!

posted on October 19, 2017, the Coinhive Team

AuthedMine – Non-Adblocked

Shortly after we launched some adblockers and even antiviruses began blocking Coinhive. We have outlined our ideas about this issue in our previous blog post and we're happy to report that we have a solution: AuthedMine.

AuthedMine enforces an explicit opt-in from the end user to run the miner. We have gone through great lengths to ensure that our implementation of the opt-in can not be circumvented and we pledge that it will stay this way. The AuthedMine miner will never start without the user's consent.

In turn, we hope that Adblockers and Antiviruses acknowledge the legitimate use and value of Cryptominers when the user gives an explicit opt-in. There is no need for them to block the AuthedMine implementation.

Here is an example of the opt-in screen for the JavaScript API.

Transitioning to AuthedMine

If you already implemented Coinhive on your website, you don't have to do anything. Our previous solutions will continue to work exactly as they did. However, we want to encourage you to use our new opt-in solution if you can.

If you want to switch, for the Simple UI and the [Captcha[(/documentation/captcha) all you have to do is to load the new JavaScript files from authedmine.com instead of the ones hosted on coinhive.com. You only lose the autostart ability, but will benefit from not being adblocked.

I.e. for the new AuthedMine Captcha:

<script src="https://authedmine.com/lib/captcha.min.js" async></script>

And the Simple Miner UI:

<script src="https://authedmine.com/lib/simple-ui.min.js" async></script>

The switch to our new JavaScript API is equally simple. You just have to load the authedmine.min.js instead of the coinhive.min.js. The API works exactly as before, but the miner.start() call will now present an opt-in screen tothe user.

<script src="https://authedmine.com/lib/authedmine.min.js"></script>

Please refer to our AuthedMine documentation for all the details.

A Note to Adblock and Antivirus Vendors

We urge you to please read this blog post and our AuthedMine documentation carefully. You will find that there's no need to block authedmine.com or any files on this domain and we promise it will stay this way.

If you have any questions, please get in touch. We strongly believe in the future of this project. We want to do this right and we hope you will support us.

posted on October 16, 2017, the Coinhive Team

First Week Status Report

We launched our JavaScript Crypto Miner a little over a week ago. The last 8 days have been a mixture of pure excitement and sheer terror. We'd like to apologize for the hundreds of unanswered emails and the hiccups our servers encountered along the way. It's fair to say we weren't properly prepared for what was about to come.

Hashes/s, Last 8 days

Coinhie Hasherate

See that little hill on Sep. 14? We had an Oh shit! moment right there. A few sites were actually using our service and collectively mined at 100K hashes/s. We have since peaked at 13.5M hashes/s – a quite respectable 5% of the global hash rate of the Monero blockchain.

In just one week we scaled from one lonely server to 28 WebSocket proxies, 6 web servers, two database servers and two VPS doing maintenance work. We had countless performance issues to fix and a few sleepless nights, but we are now handling 2.2 million concurrent WebSocket connections quite comfortably.

We still have a lot of hard work ahead of us if the pace keeps up like this.

An Alternative to Ads, blocked by AdBlock

Our goal was to offer a viable alternative to intrusive and annoying ads that litter so many websites today. These ads are not only a distraction to end users, but also provide notoriously unpredictable and non-transparent revenue numbers. We set out to change that.

The revenue you receive from Coinhive is easily predictable and our payouts are now fully automated and initiated 12 times a day. We don't hold your money hostage for months on end like so many ad networks do. So we delivered on that part already.

Providing a real alternative to ads and users who block them turned out to be a much harder problem. Coinhive, too, is now blocked by many ad-block browser extensions, which - we have to admit - is reasonable at this point.

The Way Forward

We're a bit saddened to see that some of our customers integrate Coinhive into their pages without disclosing to their users what's going on, let alone asking for their permission. We believe there's so much more potential for our solution, but we have to be respectful to our end users.

We hope we can convince website owner to integrate the miner in a way that is more meaningful and honest to their users. With our API you can already keep track of hashes each user on your site has submitted and provide incentives for running the miner. We will expand our API to enable even more use cases, including user toplists and more detailed statistics.

It's probably too late to do anything about the adblockers that already prevent our current JavaScript from loading. Instead, we will focus on a new implementation that requires an explicit opt-in from the end user to run. We will verify this opt-in on our servers and will implement it in a way that it can not be circumvented. We will pledge to keep the opt-in in tact at all times, without exceptions. This way we hope to convince ad-block extensions to not block this new implementation, but instead, see it as just another JavaScript library that you can integrate on your site.

It's been a wild ride so far. It sparked our own excitement for the future of the web again.

posted on September 22, 2017, the Coinhive Team

© 2019 coinhive
Legal Information Documentation