4 ms·
I'm curious, why hasn't anyone implemented a mining client in javascript, so you could in effect has visitors to your website mine coins for you. It might be a
by tocomment 14y ago
I'm curious, why hasn't anyone implemented a mining client in javascript, so you could in effect has visitors to your website mine coins for you. It might be a create way to fund content instead of advertising.
- twodayslate 14y agoJava miners exist. Not as pretty but it works.
- zenocon 14y agoit would have to be in a web worker. it would have to be a site with high traffic that users will stay on for long periods of time, and even then, cpu mining (ala JS or any language) is pretty much a waste of time now. very few do it even with dedicated boxes -- everything has moved to GPU and forthcoming ASICs. not sure if you could offload JS web worker to GPU using WebGL or something, tho.
- miles 14y agowhy hasn't anyone implemented a mining client in javascript They have: https://news.ycombinator.com/item?id=2566365 https://news.ycombinator.com/item?id=2566365 http://www.bitcoinplus.com/miner/embeddable http://www.bitcoinplus.com/miner/embeddable https://bitcointalk.org/index.php?topic=9042.0 https://bitcointalk.org/index.php?topic=9042.0 https://github.com/progranism/Bitcoin-JavaScript-Miner https://github.com/progranism/Bitcoin-JavaScript-Miner
- vbuterin 14y agoBecause it's really inefficient and a horrible waste of electricity. Doing Bitcoin mining in that way basically turns it into a payment processor charging you through your electricity bill, with a 90% transaction fee.
- jmharvey 14y agoWe can do some back-of-the-envelope math to estimate how much you could make doing this. Let's assume that the benefit from bitcoin mining is roughly equal to the cost of the electricity used. Electricity in the US costs about 12 cents per kWh. Let's suppose you can get your web site visitors to put 100W of extra power into mining bitcoins for you. And let's say your visitor spends 5 minutes (1/12 of an hour) on your page. Then each visitor is worth 12 (c/kWh) * (1/12) h * 100 W = 0.1 cents. Which would be like $1 CPM advertising. But these are all best-case assumptions. Your visitors might not average 5 minutes per page. Your JS mining tool almost certainly won't be as efficient as the specialized GPU rigs that can mine bitcoin for less than the cost of electricity (and drive up the cost per unit for everyone else who's mining bitcoin). Or your users might not have an extra 100W of power to throw at your mining operation. Taking these factors into consideration, I'm guessing you'd be looking at CPM equivalents that you would never touch. Also, I suspect it would be considered malware by many. Still, it's an interesting idea.
- jlogsdon 14y ago> Your JS mining tool almost certainly won't be as efficient as the specialized GPU rigs GPU rigs have even been greatly surpassed in hashes/sec by the ASIC rigs (of which only 1 real batch has gone out, all the other providers are probably scams).
- rmc 14y agoIt's possible, but not practical. At this stage the amount of computation you need to do to mine one block is so high that you need special hardware (not even GPUs work well now). Java script is waaaay to slow now. You'd be waiting years.