Hacker News new | past | comments | ask | show | jobs | submit login
Tidbit: Client-Side Bitcoin Mining (tidbit.co.in)
78 points by aba_sababa on Nov 11, 2013 | hide | past | favorite | 53 comments

Hey HN!

I'm Jeremy, one of the devs of this hackathon project. Thanks for checking this out, glad to see the community has interest in it. We made this project for NodeKnockout, and did not intend for it to be posted on HN.

In the current release, we have a couple of things blocked out for various reasons (legal, ethical, etc) so that it is not 100% functional.

We are very well aware that our current hashrate is pretty impractical. However, there are a number of optimizations we plan to implement to greatly improve this, including using WebGL. The problem that we're looking at starts with bitcoin, but we're also looking at more general purpose computing in the client too (ie, text mining).

And in terms of battery life, yes, it does run up the cpu a bit. However, for certain users (ie, desktop), spare processor cycles could be more worth it than seeing ads. Web services using tidbit could make it an opt in thing for desktop clients.

I really like this idea actually. If the performance would be (a lot) better, it could be a very nice alternative to advertising. Everyone who visits your website would 'pay' you with some CPU/GPU cycles, and in trade for that you give them a web page that's completely rid of advertising, third-party tracking cookies, and other stuff that users find annoying.

Personally I think advertising has been dying for years now, especially with all the adblockers that become more and more popular. It's time to come up with an alternative business model for websites (no, not talking about SaaS here..).

What's your share in this? You take a certain percentage of the mined coins?

Too bad mining is becoming more and more difficult, meaning that you will earn less and less.

I'm interested in seeing the Bitcoin mining module. Would you mind putting that up on GitHub?

What sort of text mining could you do "profitably"?

Bear in mind that this will net the creator a few cents a day (if that even), and burn thousands of dollars in power for their clients. This wasn't economical in 2011 and it's sure as hell not economical now. I'd be pretty pissed off is websites started eating my CPU and battery just to make such a pitiful amount of revenue.

To put this in perspective, for $5 you can buy a USB ASIC miner that will do 335MH/s, worth tens of thousands of full time JavaScript clients.

I don't think you can get a USB ASIC for $5. They're still in the tens of dollars range.

For new ones sure, but there's people selling used ones for a lot less. There's cheaper Bitfury based ones now anyway, so I can't imagine why anybody would spend their money so unwisely.

Seriously? This idea was horrible back when Coinlab tried it in 2012 ( http://bitcoinmagazine.com/1086/bitcoin-mining-a-new-means-o... ) and it's even more horrible now. At the very least mine Litecoin or Primecoin.

How do the various cryptocurrencies compare? There appear to be quite a few of them [1,2]. Are BTC, Litecoin, and Primecoin the best/most popular?

[1] http://en.wikipedia.org/wiki/List_of_cryptocurrencies

[2] https://en.bitcoin.it/wiki/List_of_alternative_cryptocurrenc...

http://coinmarketcap.com/ has estimates of market capitalization based on exchanges for various cryptocurrencies. A reasonable proxy for popular in some cases.

Litecoin is #2 but when you click the bottom link "Looking for Ripple?", Ripple is #2.

Ripple/Opencoin has 10x the market cap of Litecoin: http://coinmarketcap.com/ripple.html

But Ripple isn't a typical open source "crypto-currency". It's well financed and backed by big SF investors with the intention of making the founders/investors money, instead of miners, as the currency scales in price.

The reason to mine Litecoin in this context is because the algorithm (scrypt) hasn't been taken over by ASICs yet. So CPUs have a smaller disadvantage.

Last I checked, Litecoin was the only alternative currency that's been gaining serious traction over time.

20K hashes/client

ha, good luck with that

28nm asic miners are out and they do 600GH/sec at $4k + 1Watt/GHs

bitcoin is just about out of reach for normal people, we missed the train

I'm curious about algorithmic speed-ups to Bitcoin mining instead of hardware improvements.

I know to collect a mining reward you have to calculate a SHA256 hash of a block of transactions (or a block header -- I can't remember which) combined with a nonce. This hash must be below a certain value, and this value becomes smaller over time so that there's a lower chance of finding a nonce that satisfies the inequality.

I know mathematically, it's essentially impossible to find collisions or figure out some data that produces a particular hash, but what I wonder is whether it is possible to figure out some technique to speed up the hash calculation.

For instance, you have SHA256(nonce1 + block data). That doesn't work, so you try a new nonce: SHA256(nonce2 + block data). It seems to me that because there is a lot of redundant initial data used within the calculation (same block data every time) that there might be a way to exploit this and speed up the calculation of all future attempts. If this was this case, you'd have a huge advantage over all the people starting each new calculation from scratch.

Another option would be to figure out a way to compute SHA256 more quickly than is currently done. I know there's incremental speed-up techniques that are figured out from time to time, but what are the chances of discovering a vast speed-up?

Any cryptographers here? What is the feasibility of either of these options?

The obvious improvements have been done a long time ago (there are tens of millions of dollars to be gained here), and the current state of the art continues to spend tremendous effort pushing out every incremental gain they can. Most of the innovation is done in hardware implementations at the moment, because if you're running a software algorithm to find the hash you've already lost.

Solving a SHA256 hash for a particular value would require breaking the hash in some currently unknown way. However, looking at how past hash algorithms have fared, it seems likely this will eventually happen.

Already done, pretty much from day one (It's called 'midstate' if you want to google it).

To my knowledge, all the possible algorithmic optimizations have been developed and implemented since 2010 or 2011. Once you have as minimal a SHA256 implementation as possible, combined with retaining parts of the state for further calculation (as you describe), you can't really make it much faster in terms of software.

I believe the only optimization efforts possible beyond this point will be better utilization of GPU drivers (or maybe custom GPU drivers?), as well as designing new hardware.

I'm only casually familiar with ASIC mining, but I do recall hearing that the best position to be in is selling tools to the miners. Still, I'm curious; how much would you have to invest into modern mining hardware in order to see a return on investment? I'm going to assume you either need a lot of these or have to join a pool.

Is this a game only playable by those with tens or hundreds of thousands of dollars?

The biggest problem with ASIC miners that I see is that they do not ship until "a few months". With the mining difficulty growing exponentially [1], the hardware you buy now will be relatively obsolete in a few months. For example by buying the latest 600GH/s from Butterfly labs[2] at 4500$, you'd break even in about a month according to the acula mining calculator[3].

The problem is that your card will arrive in January. In 2 months, if the bitcoin difficulty keeps growning at a steady pace (which is improbably, it probably keep growing exponentially), the break-even will be closer to 2 months. While you will probably keep making a few hundred of dollars after the break-even point, your chances to "double up" your initial 4500$ investments are close to zero. I have no idea about the profit marging ButterflyLabs make on those cards, but I'd bet it's larger than "a few hundred of dollars". That's why the mining gear business is probably more profitable than the mining business itself.

Of course this doesn't stop Butterfly Labs from having large farms of those cards...

[1] http://bitcoindifficulty.com/

[2] http://www.butterflylabs.com/monarch/

[3] http://www.alcula.com/calculators/finance/bitcoin-mining/

KNC is already shipping a 28nm 550GH/sec miner for $5k

There are people already using them and more next month.

Butterflylabs will be out early next year.

Butterflylabs is notorious for delivering many months late.

All the ASIC miners are notorious for delivering many months late.

If a thousand ASICs are profitable then one ASIC should also be profitable. The problem today is not scale but finding any profitable ASIC.

Assuming your payoff for that 4k is 3 months ignoring energy costs...

600 * 1000 * 60 * 60 * 24 * 30 * 3 / 4000 = 1166400000 thousand hashes per dollar. If the average person spent 60 at 20,000 Hashes seconds on your site you would need 972,000 people to connect to make a dollar... ouch.

And more hashing power is coming online all the time. Here's a link to long-term plots of the difficulty and reward for Bitcoin mining: http://www.blockchained.com/chart_large_log.png

If you don't already have hardware in your hands it is unlikely to be profitable.

You can be sure that no one with a computer running on a battery will ever visit your website again...

Even more so now that Android and OSX indicate at the application level what is impacting system battery.

Couldn't this be considered a malicious feature?

The site offers virtually no information, so is the user notified that their machine is being used as part of a mining effort, or does it occur silently in the background?

This should be converted to litecoin, maybe then it would make some money. 1000 KH/s ~0.8 LTC/day so with 50 users all day you would make $4 * 0.8 = $3.2 and if you had a million users it would be worth 64K/day assuming you could get the same hash rates.

> assuming you could get the same hash rates

You won't. Litecoin's scrypt is (purposely) much slower.

well even assuming it was two orders of magnitude less then bitcoin, it would still be $640/day which is a good improvement over bitcoin. Based on this, that seems to be about the actual difference. https://litecoin.info/Comparison_between_Litecoin_and_Bitcoi...

You would need 500,000 people mining on your site all the time to match one 10GH ASIC...

Any site that constantly has 500,000 active users would have server costs that dwarf any revenue this would bring.

This is not very new idea, I think this is first PoC I can find quickly: https://bitcointalk.org/index.php?topic=166417.0

Given current network difficulty, this won't earn 0.000001 $ per impression (more exact calculations are needed)

Wow, this is scary. I guess as long as it's EXTREMELY visible that someone were using up my CPU to make them money, I'd be alright with it, but otherwise, I would see this as blatant malware.

If they could somehow get a hold of the GPU and you had the equivalent of 10 decent gaming PCs connected at all times you'd get a little over $450 a year by my lazy calculations


In fact, I'm testing it now and the indicator "connected clients" does not rise above 0. Probably, not even works. This is an experiment for a contest => http://nodeknockout.com/

Same here, would like to give it a try at least

Aren't we well past the point where bitcoin mining on general purpose hardware costs more in energy usage than you earn by mining? I don't think that a model that has you earning less for viewing your site than the power company is going to be viable.

We're long past the point where mining on a GPU makes economic sense, and this thing is roughly 1/10,000 as energy-efficient as a GPU.

This seems real scary. "Give us your wallet address, email, and a password, then let us run a bitcoin miner for everyone that hits your page that may magically cash out any where."

Mmm... Although if it's legit I'd use it, but only if it's open source.

Just make a bitcoin wallet for this sole purpose, if they steal it then it won't be that bad.

Reminded me of the Unoceros team, and their SDK (currently in Alpha): http://unoceros.com/

The idea is "make money with your phone, in the background."

This will bring to your business $0.0001 /per month. Or less.

Sign up here....

So how many live clients would you need to mine 0.1 bc/day?

5 million, given present work factor and 20khashes/s per client.

For what time duration?

1 day? I think it was mentioned in OP in the form of 0.1bc/day. If someone big like cnn.com integrates this js code, you might make $20 a day. I still think adsense has better pay with that many viewers. One would need 5 million visitors to stay on your site for 24 hours. There are very few websites where people do that... maybe facebook/gmail.

24 million hours at 20KH/sec nets you $6.80 at current difficulty and price.

20k hash rate is too low, even with 20k live clients.

Now that's an efficient use of CPUs!

related to the article's topic: anyone with a major interest in the security/robustness of Bitcoin miners, please contact me. email in my profile here.

Applications are open for YC Winter 2023

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact