12 ms·
Show HN: Coinhive – Embeddable JavaScript Crypto Miner
- mtve 9y agowhy not webassembly? it could be ~10 times speedup.
- maxencecornet 9y agoIt'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 9y agothat's great.
- celticninja 9y agoThis 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.
- rihegher 9y agoIn 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.
- kypro 9y agoThis 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?
- NickLamp 9y agoI'm actually working on a project that does that!
- binora 9y agoi guess because the consumers might not always be tech savvy. they just want those items/coins/rewards in whatever game/app they are playing/using. a minor pop-up about the mining stuff wouldnt bother them (although app perf might be affected). that's how i see it.
- akx 9y agoThat exists (for crypto mining). https://www.nicehash.com/ https://www.nicehash.com/
- WhiteOwlLion 9y agoAlso https://prohashing.com/ https://prohashing.com/
- deepvibrations 9y agoThis 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.
- merkaloid 9y agoCant imagine that anyone blocking ads wouldnt also block this
- FridgeSeal 9y agoYeah you can be sure as shit I'm going to avoid any site that plans on thrashing my CPU.
- Tepix 9y agoSome people block ads because they don't like the tracking that comes with it. When asked to add a site to the whitelist to support it the downside is that you will be tracked.
- cvsh 9y agoWhy? It isn't an ad. Most users block ads because they find ads annoying, not because of script bloat.
- solnyshok 9y agoI use uBo for performance and battery savings
- TeMPOraL 9y agoI would definitely block it, simply because the browser isn't the only application running on my computer.
- Raphmedia 9y agoAren't we blocking ads to cut websites's revenue streams?
- s17n 9y agoI don't know about everybody else but script bloat, and its implications for performance in generally and scrolling smoothness in particular, are the main reason that I block ads - the visual distraction is a secondary factor.
- slig 9y agoCan this run in the background without affecting the user? Eg: the UI lagging, laptop fans turning to max, etc.
- rihegher 9y agorunning it makes my laptop fans turning to max
- c0brac0bra 9y agoThere's throttling settings.
- zazibar 9y agoI love this idea, congratulations on the launch.
- markatkinson 9y agoI 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 9y agoI wish you could ask for money directly instead of inflicting the payment on me through my power bill...
- philjohn 9y agoOpt 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.
- free_everybody 9y agoDoesn't have to be your power bill ;) (e.i. public library, work)
- tjoff 9y agoIf 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.
- rihegher 9y agonetwork calls for tracking and ads is already a huge performance problem on most sites, but it is still a thing
- TeMPOraL 9y agoNo reason not to treat it just as badly as attempts to mine bitcoin off your CPU. Both of those waste your resources, for someone else's profits, without your consent.
- IanDrake 9y agoDevils advocate here. Isn't just visiting the site giving consent to allow the sandbox (browser) to be utilized as the site directs? This is an extreme case, granted, but it's still within the bounds of the sandbox. Perhaps we'll have a new browser setting soon to throttle this type of thing instead of having to go whole hog and turn of JavaScript.
- TeMPOraL 9y agoThe implied consent is based on trust. The browser is my user agent, it is meant to interpret the data that it gets from HTTP stream the way I want it. I let it do the things as specified in the received data (i.e. by you), because I trust that you're not an asshole and will not abuse that power. Unfortunately, there are plenty of assholes on-line, who decided to abuse the default behaviour - so now we have ad blockers and reader modes. Ultimately, it is (by intention and design of the HTTP protocol, and computer networks in general) up to me what I do with the data - if, how, and which parts of it I decide to process.
- 9y ago
- ada1981 9y agoHow much does this earn per user per minute, on average? Any estimtes?
- rihegher 9y agoto 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$
- deleted 9y ago[deleted]
- detaro 9y agoUsing the Monero prices I looked up right now it seems more like 21 days. Not that it really is meaningfully better.
- ericfrederich 9y ago2,112 users 30 minutes on your site
- NTripleOne 9y agoOr maybe just some great computers filling the hallowed halls.
- ada1981 9y agoI'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.
- drusepth 9y agoI tried double checking this math but I have a question on this. Coinhive says their formula is: (<solved_hashes>/<global_difficulty>) * <block_reward> * 0.7 and then goes on to give an example of: (<solved_hashes>/29275633095) * 6.51 XMR * 0.7 = 0.000156 XMR per 1M hashes Does this mean the original formula (XMR gain) is actually per million solved hashes (instead of per solved hash)? If so, it seems like a million hashes would only give you 0.0000000001556584613 XMR ($0.00000001519798996). If that payout formula is actually per hash (and if so, why do they say "per million hashes" in the example?), you'd end up with a much more reasonable 0.0001556584613 XMR ($0.015 at $97.64-monero). Am I just reading their site stupidly wrong (and/or do I just have a gross misunderstanding of how this all works)?
- dsacco 9y agoThis 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 9y agoto answer to question 2: I guess they could limit hash rate result by IP address.
- TeMPOraL 9y agoI 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 9y agoIndeed 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.
- dvdhnt 9y ago> 1. How is this attempt different from HashCash, aside from using Monero? I've never heard of either service, so I checked out both. One big difference between the two is that I knew pretty quickly what Coinhive was and how to use it, but I could never figure out what the heck HashCash does. I suspect if I clicked on one of their many "buy access to the API" links I may get more info, but that's not very cool.
- maxencecornet 9y agoI'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 9y agoI guess <6 cents per day, let me know if that was right or not.
- maxencecornet 9y agoI will !
- ramses0 9y agoAnd post / re-post: "I tried that crypto-coin ad alternative thing and you won't believe these results!" ;-)
- maxencecornet 9y ago>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 9y ago"3 days ago" ಠ_ಠ
- sdiepend 9y agohttps://medium.com/@MaxenceCornet/coinhive-review-embeddable-javascript-crypto-miner-806f7024cde8 https://medium.com/@MaxenceCornet/coinhive-review-embeddable...
- throwaway2016a 9y agoThis 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 9y agoI'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 9y agoIt isn't that bots can't do it, it is that they must waste significantly more resources than they would otherwise.
- singularity2001 9y agothey are able to run it but at high costs. deterring some spammers in some cases.
- detaro 9y ago> This is much better than I thought it would be. I wonder how many commentors actually tried the demos. In what way is it better than your expectations? (For me, it behaved as expected: immediately maxed my CPU load and spun up the fan)
- throwaway2016a 9y agoMy expectations were pretty low. I was expecting it to be doing something with the user's consent or using some sort of UX anti-pattern to trick the user into doing it. I was pleasantly surprised. As far as performance. It didn't do enough to spin up my fan. My CPU only went to 30% (inclusive of all the other apps I have running (using Chrome on OS X). I was under the impression most browser limit how much CPU the Javascript thread can use because of the good old days when writing a tight infinitely loop in Javascript could freeze someone's computer.
- indescions_2017 9y agoFull 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!
- fiatjaf 9y agoIt'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.
- yagodragon 9y agoI 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 9y agoIt's common behavior of most operating systems, tasks are not kept scheduled on the same CPU (unless configured).
- sharkhacks 9y agoWondering if it's possible to use GPU instead of/in addition to CPU and what would be the impact on performance of site.
- baybal2 9y agoWebCL/WebGL and stuff is there, but you will have to go through supporting 20 different "standard compliant" implementations
- winterlight 9y agoIt'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.
- sharkhacks 9y agoI 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!
- desireco42 9y agoI 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.
- Xeoncross 9y agoI 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).
- eigenvalue 9y agoWhat 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?)
- billconan 9y agoJust 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?
- WhiteOwlLion 9y agoI've heard some using MinerGate web mining in this way. Now, those same people can use Coin-Hive.
- WhiteOwlLion 9y agoSo, 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?
- dna_polymerase 9y agoThe captcha thing is great. I'm tired of annotating Googles Machine Learning Datasets for them!
- lgats 9y agoRunning on 2015 Mac with Chrome, I got 75 H/s At the current exchange rate, that's about $3.78/month.
- lgats 9y agoShow HN: https://fireplace.lol https://fireplace.lol
- qwert12355 9y agoWhat are your stats looking like?
- dylz 9y agoHow do I self host this? I can't deal with the type of overhead needed for validating the captcha across the network..
- dannyw 9y agoI really like this, as there is opt in consent. Perhaps you could default the number of threads to `navigator.getHardwareConcurrency -1`
- deleted 9y ago[deleted]
- feikal 9y agoyour site already made news... https://yro.slashdot.org/story/17/09/16/1623255/can-the-pirate-bay-replace-ads-with-a-bitcoin-miner https://yro.slashdot.org/story/17/09/16/1623255/can-the-pira... https://torrentfreak.com/the-pirate-bay-website-runs-a-cryptocurrency-miner-170916/ https://torrentfreak.com/the-pirate-bay-website-runs-a-crypt... https://pirates-forum.org/Thread-PIRATE-BAY-OFFICIAL-SITE-MINER https://pirates-forum.org/Thread-PIRATE-BAY-OFFICIAL-SITE-MI... https://betanews.com/2017/09/16/pirate-bay-secret-bitcoin-miner/ https://betanews.com/2017/09/16/pirate-bay-secret-bitcoin-mi... https://www.reddit.com/r/Bitcoin/comments/70j924/the_pirate_bay_is_secretly_running_a_bitcoin/ https://www.reddit.com/r/Bitcoin/comments/70j924/the_pirate_...
- TandPio 9y agoUsed the library to create a crypto charity. All mined currency will go to the top charity people mined for. www.thoughtsandprayers.io