Hacker News new | ask | show | jobs
by eyezick 3199 days ago
CPU mining is so unprofitable, but I suppose with thousands of users..
6 comments

It's not unprofitable if you aren't the one carrying the costs. It's inefficient though, that's for sure.
I recall that for Bitcoin, the profit was something like a billionth of a cent per user-hour. So it would be hard to be profitable even if all you're paying for is a little engineer time to deploy it.

I assumed this whole notion of browser mining as a replacement for ads was just a laugh, but maybe not. Are there coins where it can actually make a noticeable amount of money?

That's the reason TPB is using Monero. It was specifically designed to be mined on consumer CPUs with little to no benefit to running on a GPU or ASIC.
That's partially incorrect. While XMR is very resistant to ASICs and not very GPU friendly, a high-end consumer GPU will still mine over 2x as much as a high-end consumer CPU.

edit: of course because the majority of users have integrated gpus, cpu mining will typically be faster.

Bitcoin quickly moved to GPUs and then ASICs, making mining them with CPUs pointless. Some coins are designed to be very difficult to mine with GPUs or ASICs, so a Browser based miner isn't so ridiculous. Wasm also makes it a bit faster.
What sort of return per user-hour would you be looking at with one of those?
According to the reddit thread on the matter, even at TPB's scale they were looking at only < $500 a month.

I wonder why CoinHive isn't using WebGL for this.

Quoting CoinHive's site:

> [...] There are solutions to run the Cryptonight algorithm on a GPU instead, but the benefit is about 2x, not 10000x like for other algorithms used by Bitcoin or Ethereum. This makes Cryptonight a nice target for JavaScript and the Browser. [...] Our miner uses WebAssembly and runs with about 65% of the performance of a native Miner. [...]

Can you actually use WebGL for this? I mean, don't you need a user-visible graphics context? That's a serious question, I have used WebGL only once in my life and that was years ago.

On the other hand, WebGPU looks exactly like the kind of technology that would make web-based GPU-enabled bitcoin mining realistic.

It doesn't have to be visible. You can use display: none or whatever to hide it.
You could put it off screen.
But if most users have integrated graphics, and even with dedicated graphics cards the improvement is nowhere near an order of magnitude, would it be much better?
That $500 was probably what they made within the hours they tested the code, as they do millions of pageviews an hour. Reddit still thinks they're lucky to cover a handful of servers LOL.
For BTC, sure. For XMR, maybe not. And the site doesn't carry the load.
Not for XMR. There's quite a few altcoins out there aiming to solve the asic problem with aggressively anti-asic algorithms.
There is an interesting position that asic mining is the most democratic and decentralized way. The easier and simpler and cheaper a miner is to produce, the more accessible it is and likely that companies can manufacture and distribute it, turning it into a commodity. Complex proofs that require cpu's, for example, hand a permanent monopoly to Intel and friends. When the nanometer race ends in a few product generations (as we reach the limits of physics), the more commoditized silicon will become, and the more likely we can get a miner for a couple of bucks at the grocery store, or embed it in devices, etc. - making it truly decentralized.
Historically, those companies have held and mined with the current generation of ASICs (that their customers have paid for!), while they develop the next generation.

Once they have the next generation off the production line, they take the used previous generation, box them up and ship them off to their customers, and then plug the new generation into their mining pools.

If we could trust ASIC manufacturers to not sit on the best hardware, you might be right. However, for the moment everyone can get their hands on CPUs and GPUs of roughly the same power, while easily accessible ASICs are several orders of magnitude slower than the current state of the art.

What do you mean by unprofitable?

If you have cheap (or free) power, it's absolutely profitable.

EDIT: I see you meant CPU mining, not mining in general. My mistake!

People are fixated on power, but this browser miningware doesn't even pay for the wear on your machine.
Not for XMR: a good 6+ core cpu will mine 1/3 to 1/2 of what a 1080ti mines using the native miners.