Briefly profitable alt-coin mining on Amazon through better code
da-data.blogspot.com
da-data.blogspot.com
What would the discussion be like if the headline was "Briefly profitable HFT FX trading through better code"?
I don't spend 24/7 attempting to make your life better.
Source: Top comment on the blog
>This is apparently what happens when computer scientists spend four weeks sick and have to keep themselves from going stir crazy. +Emin Gün Sirer , I blame you for inspiring this, and I'll buy you a beverage at NSDI with some of the proceeds. Thanks for the fun! And thanks to my online-and-offline friends who put up with me babbling about bitcoin entirely too much recently. I'm done. I think. :-)
Also, while I am still unsure of the benefits of HFTs despite trying really hard to understand how they bring liquidity by front-running etc., I still think the technology invented to make HFT possible is a net-good for humankind - GPUs that can perform trade in nanoseconds, processing happening on the same layer as network traffic, entire CPU/GPUs living an inch from the ethernet port. All of this stuff is really neat and even though the practice of HFT is morally questionable, the fact that it pushes our capabilities further is not something we can ignore.
The future world will be a much better place if I can wire $2k to my dad in India without going through multiple banks, wire-transfer fees, proof of citizenships etc. Better that we work for a world where money is not controlled by the powerful than make better shiny reports for sales and traffic analysis for mobile.
LOL. The cognitive dissonance is strong with this one. Also, mining bitcoins or squeezing a few extra cycles out of a VM is not 'research into virtual currencies'. Look people, let's just call a spade a spade here - us nerds are quite happy with our new-found economic powers (not just BC, in general), and we're all too happy to flex it when new tech (like BC) gives us an early mover advantage. Yeah I'm bitter I'm no BC millionaire because I had other things on my hands 2 years ago than running some software, while I did run SETI@HOME on a largish network for a long time a decade ago for no gain at all; but 200 years ago I would have been a peasant, now I was catapulted into upper middle class just because I was born in the right decade and with that twist in my mind that makes me grok computers better than most people. That's just how it is, why do feel we need to make moral justifications about it (or worse, whack job 'I deserve it because I worked harder' delusions like in that article yesterday about the Google dude).
http://github.com/adammeghji/ansible-ltc-mining-on-ec2
If anybody's curious to spin up a GPU instance and dabble with this, this greatly facilitates downloading, compiling, and installing the CUDA drivers, and setting up the LTC miners. Amazon has a $100 credit available too, if the current spot instance prices are prohibitive.
If we assume the most optimistic parameters: $75 * 1mo * 60 instances = $4500 in profit for 1.5 weeks of work, or a rate of ~$156k/yr.
Edit: It looks like I misread his revenue numbers for profit. Oops! Even lower margins:
"My gross revenue was about $1000, and I paid Amazon $500 of that."
$500 for 1.5 weeks' work is only $17k/yr rate. Maybe flipping burgers pays better.
I was only able to run 60 nodes for the first two days. After that, spot market prices in CA and Oregon went too high for profitability.
At this point, the spot market has gone insane. Mining with my code isn't profitable over about $0.130/hour with the current exchange rates, and the market is at, um, $6/hour in some places. I hypothesize that people are typo'ing in their EC2 spot bids and typing $6 when they mean $0.6, because otherwise it's completely irrational: You can get a normal instance for $0.65/hour. Not that people are rational, but...
It also requires some care and feeding. The $17k isn't really free passive income. The pools go awry, the exchanges go awry, ... At larger scale, you could amortize all of that management time and automate the majority of it, but at a few bucks here and there it's simply not worth it.
Maybe OP could automatically run his miners when such situations arrive, but I think it's unlikely to net anything like $17k/yr.
Edit: sliverstorm described this way better than I could.
Much like with most forms of arbitrage, and exploitable patterns in the stock market. You discovery the opportunity, you make a little $$, and the hole quickly closes as everyone else capitalizes on it too.
Edit: I'm also not paying $6/hr... That would be absurd. I'm not unprofitable by much.
No rational person would bid above the on demand price, so the spot price will never rise above the on demand price. Therefore if I bid just above the on demand price I'll never be outbid, and I won't have to deal with automating the switch from spot to on demand instances.
Needless to say, this logic is wrong.
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-spo...
This may be in response to some of the crazy bids we've seen on the spot market since people started using it for mining.
He should have used p2pool.
But beyond that, for scrypt, AMD has an internal architecture that encourages using a internal 4-wide vector ops (the key being that threads in a stream can diverge and the scheduler handles them, but the vector ops are strictly locked). This seems to give them an advantage in several "stupidly parallel" workloads that consist of basic operations in huge parallel, whereas Nvidia's architecture regains ground when the control flow/etc., becomes a bit more complicated. But calculating 64k SHA-2 or scrypt hashes in parallel doesn't stress the thread scheduler or divergence handling at all. Also, scrypt internally does well when you parallelize it into groups of 4 uint32's - that's actually the key optimization I added to my version of the miner. Which, again, maps quite nicely to AMD's preferred optimization path.
Source: I wrote the above wiki section. I am a developer who wrote a Bitcoin miner in assembly (ATI CAL IL) back in 2010.