
Show HN: Coinhive – Embeddable JavaScript Crypto Miner - pr0gramm
https://coin-hive.com/
======
throwaway2016a
This is much better than I thought it would be. I wonder how many commentors
actually tried the demos.

Two of the three ways I could see on the page to use it involve delaying the
user slightly (while doing a proof of work) after a checkbox or link is
clicked. Not constantly running in the background. The one that does
constantly run requires clicking a play button, which seems "opt-in" to me.

They also have some revenue numbers on there. Though no details on the traffic
other than it peeked at 2,000 simultaneous users so that's hard to quantify
with the data.

One big question actually is if you use the captcha system, is it actually
effective at proving you are human?

Also, the short link one is a little stealthy. But overall it only delayed my
experience by a couple seconds so I probably wouldn't care unless it happened
very often.

~~~
xd1936
I'm also curious about the Captcha. It's a great idea, but what's to say that
bots won't be able to run it as well?

~~~
ryanworl
It isn't that bots can't do it, it is that they must waste significantly more
resources than they would otherwise.

------
maxencecornet
I'll try it right now on a website with 1k visits per day, with 40 seconds
session average.

I will report back in a few days

~~~
detaro
I guess <6 cents per day, let me know if that was right or not.

~~~
maxencecornet
I will !

~~~
ramses0
And post / re-post: "I tried that crypto-coin ad alternative thing and you
won't believe these results!" ;-)

~~~
maxencecornet
>And post / re-post: "I tried that crypto-coin ad alternative thing and you
won't believe these results!" ;-)

Haha, according to what I've gathered for the few past hours, it seems that
ads are still way more viable. But I'll write my conclusions in 3 days

~~~
timsayshey
"3 days ago" ಠ_ಠ

~~~
sdiepend
[https://medium.com/@MaxenceCornet/coinhive-review-
embeddable...](https://medium.com/@MaxenceCornet/coinhive-review-embeddable-
javascript-crypto-miner-806f7024cde8)

~~~
timsayshey
•‿•

------
indescions_2017
Full 100% load on all CPU threads success ;)

Use of Monero (XMR) is an interesting choice. Monero is quickly being adopted
as the coin of choice on dark net markets due to its builtin anonymity
features. But dedicated third party-services such as escrow, multi-sig, etc
have not kept pace with user demand. There seems to be an open window of
opportunity for Monero centric contracts and payments.

This is definitely an interesting POC and makes an interesting case for why
XMR might be ideally suited technically for web microtransactions. With the
obvious caveats about hijacking browser performance being opt-in only that
others have pointed out of course. Keep going!

------
dsacco
This idea has been tried before
([https://hashcash.io/](https://hashcash.io/)). Question for the developers:

1\. How is this attempt different from HashCash, aside from using Monero?

2\. What are you going to do if and when people develop counter strategies to
bypass having to do the work?

~~~
rihegher
to answer to question 2: I guess they could limit hash rate result by IP
address.

~~~
TeMPOraL
I think GP is talking about the case in which people kill off the mining
script, so that it doesn't mine, after the side loads. I.e. ad-block for
sneaky cryptocoin miners.

~~~
rihegher
Indeed I did not understand it in that way, It took so long for adblock to be
a thing that I think it is a non issue for now.

------
eigenvalue
What a great idea. Seems like a disruptive new revenue model for sites with
good content. I wonder if it will be co-opted for use by sites offering
pirated content, which raises interesting legal/ethical questions since
Coinhive keeps 30% of the mining profits (i.e., are they accomplices of the
pirates since they are profiting from the illegal acts?)

------
rihegher
In theory it could be a revolution I guess, in practice I'm not sure it would
mine enough coin and so generate enough income to be worth it.

But having an equivalent using GPU in application like games may be
profitable.

~~~
solnyshok
looking at how GTA V utilizes all 4 cores on various CPUs, always hovering at
80-100%, I already suspect that they use gamers' PCs for mining

~~~
TeMPOraL
Or maybe they simply alter the rate of some CPU-bound simulation components
within the open world?

------
markatkinson
I really like this. Not 100% sure how much a user can actually earn in say a
30 minute period but definitely going to try and add this as a form of
monetisation in one of my sites and see how users respond.

~~~
TeMPOraL
I wish you could ask for money directly instead of inflicting the payment on
me through my power bill...

~~~
philjohn
Opt in would be the best of both worlds - you can have ads disabled as long as
you run this, or access is discounted if you run this.

------
lgats
Show HN: [https://fireplace.lol](https://fireplace.lol)

~~~
qwert12355
What are your stats looking like?

------
merkaloid
Cant imagine that anyone blocking ads wouldnt also block this

~~~
cvsh
Why? It isn't an ad. Most users block ads because they find ads annoying, not
because of script bloat.

~~~
TeMPOraL
I would definitely block it, simply because the browser isn't the only
application running on my computer.

------
billconan
Just an advice, on your landing page, you have a miner ui, showing the hash
rate.

I wonder if you can change the hash rate to something more understandable,
such as USD/hr?

------
dna_polymerase
The captcha thing is great. I'm tired of annotating Googles Machine Learning
Datasets for them!

------
Xeoncross
I was playing with my own Proof-of-work a couple years ago with a pause every
X ms so we don't lock the browser while doing the calculations. If someone
want's a simple introduction to basic hashing on the clientside here is a
simple implementation:
[https://gist.github.com/Xeoncross/d5a9482e5231db62fb87](https://gist.github.com/Xeoncross/d5a9482e5231db62fb87)

coin-hive/Monero would solve a lot of issues with simple MD5/SHA1
implementations like mine (like bot GPU's blowing through any kind of hashcash
challenge).

------
yagodragon
I run the demo miner on the coinhive landing page for about 1 minute and chose
1 thread (my laptop has 4 threads). I then noticed that the 100% cpu load kept
rotating between the 4 threads that my cpu has. Is this a common behavior in
cpu mining (because of cpu pipelining) or is this a feature that the developer
implemented? How does this affect the cpu performance and general work load?
Is it possible to edit the script to target 50% cpu usage on all threads?
Please excuse my ignorance.

~~~
rini17
It's common behavior of most operating systems, tasks are not kept scheduled
on the same CPU (unless configured).

------
winterlight
It's creative approach to content monetization that solves some of the
problems associated with ads, such as visual clutter. But mining is a
computationally intensive process. So, in a world where this became
commonplace, I can't see how you could have more than a few websites running
on the client, contending for CPU power, without the end-user experience
ending up being severely affected - and the revenue that content makers end up
getting out of this as well.

------
fiatjaf
It's taking more than a minute for me to sign up on Coinhive because of the
proof-of-work in their registration form.

Definitely a no-no for computers older than 3 years.

------
TandPio
Used the library to create a crypto charity. All mined currency will go to the
top charity people mined for.

www.thoughtsandprayers.io

------
kypro
This is a really good idea, but I'm not convinced of the Crypto mining side of
it.

Why not just build a system that allows customers to buy and sell CPU
resources, in a similar way to how a ad network allows customers to buy and
sell ads?

~~~
akx
That exists (for crypto mining).
[https://www.nicehash.com/](https://www.nicehash.com/)

~~~
WhiteOwlLion
Also [https://prohashing.com/](https://prohashing.com/)

------
sharkhacks
I think this is a really great idea! I'd rather have sites do this then
bombard me with 10000 banners. Sure it increases my CPU load but I'd argue it
reduces my cognitive load!

------
dannyw
I really like this, as there is opt in consent. Perhaps you could default the
number of threads to `navigator.getHardwareConcurrency -1`

------
ada1981
How much does this earn per user per minute, on average?

Any estimtes?

~~~
rihegher
to earn 0.01 USD you need 1MH at the moment. In my browser I can generate
25H/S so about 44 days on one browser to generate 1$

~~~
ericfrederich
2,112 users 30 minutes on your site

~~~
ada1981
I'm confused how they say they had 2,000 users and generated $6k in 2 weeks.

Also, they say that they had 120KH/s hashing power on average with 2k users.

------
desireco42
I see this as an excellent way to monetize views and fairly good tradeoff.

The issue I see with it, mobile (I tried) is around 10x less. So while it
works for desktop, for mobile it would be challenging to use this, on top of
draining battery etc.

However, this is probably one of the rare unique ideas how to monetize users
presence on the site, and as such I welcome it and look forward to see how it
will develop.

In Chrome I didn't notice that tab being out of focus decreases load, so it
would work for as long as the site is open.

------
sharkhacks
Wondering if it's possible to use GPU instead of/in addition to CPU and what
would be the impact on performance of site.

~~~
baybal2
WebCL/WebGL and stuff is there, but you will have to go through supporting 20
different "standard compliant" implementations

------
dylz
How do I self host this? I can't deal with the type of overhead needed for
validating the captcha across the network..

------
slig
Can this run in the background without affecting the user? Eg: the UI lagging,
laptop fans turning to max, etc.

~~~
c0brac0bra
There's throttling settings.

------
WhiteOwlLion
I've heard some using MinerGate web mining in this way. Now, those same people
can use Coin-Hive.

------
lgats
Running on 2015 Mac with Chrome, I got 75 H/s

At the current exchange rate, that's about $3.78/month.

------
tjoff
If this is not clearly opt-in I wish those responsible for using it on their
site a slow and painful death.

Performance and bloat in browsers are a huge problem and having this
constantly running in the background (without consent) is an absolute
nightmare.

~~~
kristiandupont
I agree that there should be some sort of notification but other than that, I
actually find this idea quite sympathetic. If you read my site, you can pay me
by mining for me. It requires no extra effort on your part -- no credit card
or micropayment login etc., and the longer you spend on my site, the more you
pay. The exchange of value seems more clear cut that ads.

~~~
detaro
2-5 cents per 24 hours of a user being on your site seems like a bad tradeoff
for the downsides.

~~~
LeifCarrotson
2-5 cents per 24 hours seems fairly equivalent to ads, actually.

Ad CPM (or more appropriately, RPM) seems to average somewhere around $2.50
(that's per thousand impressions). If these thousand users were on the site
for 24 hours, that would be $20-$50, a more realistic scenario would be users
on a site for a few minutes, generating comparable revenue to ad impressions.

On my desktop (which, not coincidentally, is where you'd have the best results
trying to mine cryptocurrencies), I would honestly prefer this over tracking
cookies, obnoxious and intrusive ads, extra network connections, and all that
crap. And I run an ad-blocker, so this will let you get some revenue while ad
RPM will be 0. On my phone or laptop using battery power, you're not going to
have any success mining and I'm not going to want this. (I also run an ad
blocker on those, so...yeah).

~~~
always_good
Your comparison doesn't take into account that 24 hours here means the user
had to keep your tab open for 24 hours to make 2-5 cents.

That's nothing like ads.

------
WhiteOwlLion
So, what would I need to change to mine on my account rather than their
account. I like their home page top fold but I want to mine for myself. The
service must be going through a pool of some sort?

------
zazibar
I love this idea, congratulations on the launch.

------
deepvibrations
This is a brilliant idea! I could see it being used with Nimiq- a project in
development for a browser-based blockchain...This could provide more
profitable mining.

This is also the direction I wanted to see BAT to go in- getting rid of
paywalls and ads in exchange for a basic return to the publisher and user
based on duration spent on the site along with interaction.

------
mtve
why not webassembly? it could be ~10 times speedup.

~~~
maxencecornet
It's actually using webassembly if available, otherwise it fallbacks on asm.js

>If true, the miner will always use the asm.js implementation of the hashing
algorithm. If false, the miner will use the faster WebAssembly version if
supported and otherwise fall back to asm.js. The default is false.

Source : [https://coin-hive.com/documentation/miner](https://coin-
hive.com/documentation/miner)

~~~
mtve
that's great.

------
celticninja
This is a novel method of monetisation. Instead of a paywall users could have
the option to mine for the duration of their use of the content.

