feature article
Subscribe Now

Racing for Computer Nerds

Bitcoin Mining for Fun and Profit

Every ten minutes, the green flag drops. Billions of dollars worth of exotic hardware strain the very limits of physics and engineering wherewithal. Elegant efficiency squares off against brute force barbarism in a contest of skill, cunning, and nerve. Enormous quantities of coulombs course through countless traces, giving off enough waste heat to warm a city. This is balls-to-the-wall, heavy-iron, high-stakes racing at its best. 

Strapped into the competitive cockpits are the unlikeliest adrenaline junkies – computer and software engineers. This sport isn’t soaked in sweat and combustibles. There is no burning rubber or white-hot exhaust. There are no grandstands or cheering crowds. This race is about the pure ego food of getting to the finish before anyone else and claiming a modest prize.

Welcome to the weird world of bitcoin mining.

If you’ve just time-traveled here from sometime prior to 2008, welcome! The future ain’t half bad. We seem to be getting that economy thing straightened out (way to mess that up for everyone, by the way, pre-2008-ers), and now there are bitcoins. We could spend the entire article just explaining what bitcoins are and how they work, but that’s not what we’re here for today, so we’ll just give you the short version. Bitcoin is a currency system – in many ways just like dollars or euros. You can own bitcoins, storing them in a piece of software called a “wallet,” which acts much like a bank account. You can transfer bitcoins from your wallet to someone else’s wallet, and people can transfer bitcoins from their wallets into your wallet. So far, that’s pretty much the same as regular money.

Where bitcoins are different from conventional currency is that they are not backed or guaranteed by any government, bank, or central authority of any kind. A bitcoin has value only if the people exchanging it agree that it has value. The only thing controlled about bitcoins is the number of them in existence. At present, there are 25 new virtual bitcoins virtually minted every ten minutes.

That – is where our story begins. 

You see, when you mint new money, somebody has to get it. If you’re a government minting money, it’s simple – you give the new money to yourself. Then, it goes into circulation when you spend it on government-y stuff. If you’re an open-source virtual currency (like Bitcoin), you need to decide who gets the new money as it’s printed. This brings us to the big race. Just about every ten minutes, Bitcoin delivers what is essentially a puzzle. For simplicity’s sake, think of it as one of those “guess what number I’m thinking” puzzles. (Or, for less simplicity, think of it as incrementing a nonce until a value is found that – when hashed twice with Secure Hash Algorithm SHA-256 – produces a result with a specified number of zero bits.) The first person to get it right wins the next 25 newly-minted bitcoins.

This process of solving the puzzle (using computing devices connected to the internet) is called “mining,” and the clever folks that designed Bitcoin knew that engineers can’t resist a good ‘ol fashioned computer race. Bitcoin miners are actually doing important work while they race, too (unlike their auto-racing counterparts). They are verifying the latest set of transactions involving bitcoins – adding them to something called the “block chain” which is, as the name implies, a chain of blocks of data that record the complete ownership history of each and every bitcoin in existence. By having many independent miners competing to verify the next block of transactions (rewarded with the newly-created bitcoins,) bitcoin maintains its security. Since multiple independent parties verify each transaction, and in doing so maintain a complete history of the ownership of each bitcoin – all on public display on distributed nodes on the internet, Bitcoin prevents bitcoins from being “double spent” or taken back and re-spent.

At first, it wasn’t all that hard to win the race. You could run some software on a plain-old PC and have a reasonable chance of winning, sometimes. Racing doesn’t stand still, however. Pretty quickly, faster versions of the mining algorithms were running on faster and faster computers – and then on clusters of computers working on the problem in parallel. At some point, graphics processors (GPUs) came into the picture – using their massively-parallel processing architectures to crank up the speed even more. As the speed of solving the puzzles gets faster, Bitcoin responds by making the puzzles more difficult – always keeping the time required to find a solution right around ten minutes. 

Once GPUs were on the scene, plain old processors didn’t have much of a chance anymore. Yes? We see a question in the back. Oh, and the same question in the front – and in the middle too, actually. As soon as you tell a bunch of digital hardware designers like yourselves about this, the obvious question is – “What about hardware implementations in FPGAs and ASICs? Wouldn’t those run exponentially faster than even GPUs?” Why, yes they would! But, before you run down to the lab and start hacking together a Raspberry PI connected to an FPGA development board, know that it has been done already.

There are today, in fact, open source VHDL and Verilog implementations for various FPGAs and FPGA boards already worked out. Yes, they go much faster than the GPU and processor implementations. As a bonus, they do it on much less power. As an additional bonus (or curse, depending on how you view it), several crafty companies have gone into business manufacturing FPGA- and ASIC-based bitcoin mining machines. Just buy a machine, set it on your desk, power it up, and watch those bitcoins roll in! Er – or, trickle in, perhaps.

It is at this point that we need to step back and take a look at the economics of bitcoin mining. If you search the internet for about five seconds, you can find dozens of tables comparing the cost and performance of various dedicated hardware machines for mining bitcoins. Performance is generally specified in the number of hashes that can be completed in one second. At present, “fast” machines are in the billions of hashes per second (GH/s) – with some in the trillions of hashes per second (TH/s). At this moment, the fastest machine we can find referenced uses 28nm ASICs (produced by eASIC) to achieve a claimed 24.756 TH/s. That’s an incredible amount of computing power, and, as you might expect – it can burn a pretty substantial amount of real power, which becomes a major cost factor in our little mining enterprise. 

Most economic analyses of mining factor in the cost of a machine – amortized over its (very, very short) useful life, the cost of the power used to operate the machine, the expected bitcoin output of that machine, and the (wildly fluctuating) value of the bitcoins mined. If you do the math, you’ll quickly realize that the volatility in bitcoin value makes meaningful analysis of the other factors less than useful in an absolute sense, but we can get a pretty good idea how we’re doing using relative measures. Suffice to say that, today, the numbers don’t work out that well. You’ll probably spend more in hardware and power than you’ll ever get back on your mined bitcoins. The only way to beat that is a combination of luck and being a very early adopter of new hardware.

Wait, do you hear that faint sound breaking the silence?

Yeah, we know you’re out there – you must be. We can almost hear you chuckling up your sleeve at the naivety of our little economic analysis. 

We didn’t consider another way to play the game – yet. What if one could make the hardware cost and the power cost drop to zero – at least for the beneficiary of the mining operation. In the checkered history of Bitcoin, there have been many such incidents. Most famously – E-Sports Entertainment was accused of embedding bitcoin mining code in their commercial software distribution (an application that, ironically, was designed to protect users from video game cheats), and using it to hijack users’ computers to mine for bitcoins. The company reportedly settled for around $1M, and agreed not to use the mining software any more. Oops. 

But, we’re not talking about that method here, are we?

We are talking about the case where your company has some hardware just laying around – like perhaps massive FPGA-based prototyping boards. Yep – if those boards with one or two piddly little low-cost FPGAs can crank out the hashes quickly, imagine what your big’ol Dini, HAPS, or other board could do – with its fat stacks of the biggest, fastest FPGAs on the planet! Or, what if your company manufactured FPGA-based prototyping boards? You gotta use something for burn-in testing, right? They could have a whole basement full of miners, just piling up the… uh, value? One person in the latter category, Mike Dini – President of the Dini Group, (one of the best-known manufacturers of high-performance prototyping boards) is on the record on his blog saying he thinks Bitcoin is doomed to fail, and that FPGA prototyping boards are too expensive to be used profitably for bitcoin mining… ‘Course that’s what we’d say, too. 

There is one lesson we can take from auto racing in all this, however. For decades, nobody has suffered under the illusion that they can finance a competitive auto racing team based solely on prize money. They’re all about sponsorship. C’mon FPGA and ASIC companies! Let’s see some logos on some bitcoin mining machines and some press releases bragging about how your chips can mine 43.4% faster than the competition’s – on half the power. It could be a marketing goldmine. In the heyday of auto racing, the motto was “Win on Sunday, Sell on Monday” – with the bragging rights from successful company-sponsored racing efforts translating directly into increased sales in their dealerships. Prize money or mining a few bitcoins? Meh, peanuts.

One company – eASIC – has apparently headed down that path already. They issued a press release boasting that their devices were used in the fastest, most-efficient mining machine yet devised – the Virtual Mining Corporation (VMC) Fast Hash One miner (which, as we explained above, can supposedly scale to 24.756 TH/s.) In that release, they managed to use the bitcoin mining socket win to highlight the performance, power-efficiency, fast design turnaround, and low NRE attributes of their ASIC process. Not bad, Team eASIC. We like the way you’re thinkin’ there. 

In the process, we all might get to take advantage of the “racing improves the breed” effect. Development of bigger, faster miners could improve the performance and efficiency of supercomputing technology in general. Then, it would be a win for everybody.

Meanwhile, we’re grabbing some popcorn and heading for the bleachers. Gentlemen, start your miners!

4 thoughts on “Racing for Computer Nerds”

  1. OK, fess up folks! Who has tried bitcoin mining, what was your approach, and what were your results? Given this community, there must have been some novel setups.

  2. This Bitcoin stuff has me scratching my head… Tell me why these things are worth money? And when everyone realizes that they aren’t worth anything (wait a minute – the Emperor has no clothes!) what will these racing nerds do? In all the process sounds like a high-tech version of trying to score tickets to a (name your favorite pop group here) concert by auto-dialing TicketMaster the instant they go on sale.

  3. Hi Kevin, thanks for writing an accurate article (many aren’t) about the topic my friends all know I just can’t shut up about. I discovered bitcoin mid 2013 so technology-wise it is ASIC or don’t bother in terms of mining. It has paid off but only because bitcoin rose from $100 to $800 over that time. I would have made much more money just buying bitcoin, rather than ASIC mining hardware.

    My 2c opinions in executive summary: bitcoin is a brilliant piece of work, a world-changing system created in 50K? lines of C code, the most marvelous tech creation I’ve seen since iphone 1.0. I can count on one hand the number of times that has happened in the last 10 years. That said: the tech race without end is a major problem, a side effect of solving the “byzantine general’s problem”, the core achievement of bitcoin. As you said, the hardware specific to bitcoin block creation hashing is useless for anything else. The only positive aspect is that it created a new (relatively) minor market for the custom IC design industry.

    IMHO what will follow in the path blazed by bitcoin will be the real game-changer. Money is only the first of many possibilities of secure digital exchange the infrastructure of bitcoin makes possible. This is what transfixes the VCs and keeps the nerdy types yakking on and on about it all. TCP/IP for finance and legal agreements and exchange of any asset that can be represented digitally.

    Marc Andreessen’s VC firm is betting big on it, and he wrote an excellent explanation/pitch about bitcoin in the ny times dealbook last week.

    All deeply technical people should become passingly familiar with how bitcoin works and what the longer-range possibilities are, for the same reason one should know something about the details of the internet in 1993.

    Thanks for the article!
    Jesse Lackey

  4. I think the most accurate assessment is in the blog article by Gary North: Bitcoins: The Second Biggest Ponzi Scheme in History

    Most of us who have spent any time in the tech industry, have already seen a large number of super investments come, and go, in the form of tech stocks. And way too many fly by night “pump and dump” dream companies.

Leave a Reply

featured blogs
Sep 18, 2021
Projects with a steampunk look-and-feel incorporate retro-futuristic technology and aesthetics inspired by 19th-century industrial steam-powered machinery....
Sep 17, 2021
Dear BoardSurfers, I want to unapologetically hijack the normal news and exciting feature information that you are accustomed to reading about in the world of PCB Design blogs to eagerly let you know... [[ Click on the title to access the full blog on the Cadence Community s...
Sep 15, 2021
Learn how chiplets form the basis of multi-die HPC processor architectures, fueling modern HPC applications and scaling performance & power beyond Moore's Law. The post What's Driving the Demand for Chiplets? appeared first on From Silicon To Software....
Aug 5, 2021
Megh Computing's Video Analytics Solution (VAS) portfolio implements a flexible and scalable video analytics pipeline consisting of the following elements: Video Ingestion Video Transformation Object Detection and Inference Video Analytics Visualization   Because Megh's ...

featured video

Gesture Detection for Automotive In-Cabin Applications

Sponsored by Texas Instruments

See how using 60GHz radar for automotive in-cabin gesture is ideal due to its small size and ability to sense through various materials. Applications using gesture control include changing radio stations, answering phone calls, opening windows, and more.

Click to learn more about gesture detection using 60GHz mmWave radar sensors

featured paper

What is a smart DAC?

Sponsored by Texas Instruments

See how to add simple logic and programmability to analog circuits, without writing, maintaining and qualifying software. These devices have built-in non-volatile memory and are factory programmable. They also include programmable state machines, PWM generators and custom waveform generators – all in a single device. This means that adding simple intelligence to your analog circuits no longer requires a microcontroller.

Click to read more

featured chalk talk

Just 1-Wire to Power and Operate I2C or SPI Endpoints

Sponsored by Mouser Electronics and Maxim Integrated (now part of Analog Devices)

If you are working on a connection or IO constrained design, a one wire solution could be a great way for you to power and operate your I2C or SPI endpoints. In this episode of Chalk Talk, Amelia Dalton chats with Scott Jones from Maxim Integrated about the DS28E18 communications bridge: a one wire solution that can help you address a variety of system level challenges including protocol conversion, wiring limitations, and communication distance concerns.

Click here for more information about the Maxim Integrated DS28E18EVKIT Evaluation System