Tuesday, May 22, 2018

ASICs and Mining Centralization

Three and a half years ago, as part of my explanation of why peer-to-peer networks that were successful would become centralized, I wrote in Economies of Scale in Peer-to-Peer Networks:
When new, more efficient technology is introduced, thus reducing the cost per unit contribution to a P2P network, it does not become instantly available to all participants. As manufacturing ramps up, the limited supply preferentially goes to the manufacturers best customers, who would be the largest contributors to the P2P network. By the time supply has increased so that smaller contributors can enjoy the lower cost per unit contribution, the most valuable part of the technology's useful life is over.
I'm not a blockchain insider. But now in a blockbuster post a real insider, David Vorick, the lead developer of Sia, a blockchain based cloud storage platform, makes it clear that the effect I described has been dominating the Bitcoin and other blockchains for a long time, and that it has led to centralization in the market for mining hardware:
The biggest takeaway from all of this is that mining is for big players. The more money you spend, the more of an advantage you have, and there’s not an easy way to change that equation. At least with traditional Nakamoto style consensus, a large entity that produces and controls most of the hashrate seems to be more or less the outcome, and at the very best you get into a situation where there are 2 or 3 major players that are all on similar footing. But I don’t think at any point in the next few decades will we see a situation where many manufacturing companies are all producing relatively competitive miners. Manufacturing just inherently leads to centralization, and it happens across many different vectors.
Below the fold, the details.

A year ago Vorick wrote in Choosing ASICs for Sia:
We’ve seen a lot of discouraging things play out in Bitcoin. At points, mining pools have controlled more than 51% of the hashrate, and today something like 80% of all Bitcoin mining chips are produced by a single company, a company that has not shied away from using their monopoly to make political moves. Ultimately you only need about 5 mining pools to get 51% of the hashrate in Bitcoin, and 10 to hit 75%.
The Ethereum blockchain uses a different Proof of Work from Bitcoin, intended to discourage the use of specialized mining chips and encourage the use of GPUs instead:
The story is actually a bit worse in Ethereum — 3 pools control more than 60% of the hashrate, and 6 pools will get you over 85%. I have tried to get information about how much of this hashrate is everyday users and how much is massive datacenters. Not surprisingly, the massive datacenters are not eager to advertise themselves, and it’s difficult to get a good feel for the distribution. We know however though that there are very large Ethereum mining farms, and that these farms are able to use economies of scale to get significantly better cost efficiencies and energy efficiencies than what you can get with your GPU at home. Make no mistake, the centralization pressures that drove Bitcoin to where it is today are active in the Ethereum ecosystem as well — GPU mining is not a safe haven.
We started Nvidia in a downturn; we were the only chip company to get funding that quarter. Six months later we counted around thirty other companies all attacking the PC graphics chip market. Most of the planned to build programmable graphics chips, a general purpose CPU combined with graphics-specific accelerators. We knew than none of them could compete on performance for a very simple reason. The bottleneck for graphics performance was the bandwidth of the graphics memory. The programmable chips needed some of that bandwidth to fetch their instructions. Custom graphics chips like NV1 could use every single memory cycle for graphics.

A quarter of a century later memory bandwidth is enormously greater and GPUs are programmable, which is why they are useful for mining. But Vorkick makes essentially the same argument about mining:
At the end of the day, you will always be able to create custom hardware that can outperform general purpose hardware. I can’t stress enough that everyone I’ve talked to in favor of ASIC resistance has consistently and substantially underestimated the flexibility that hardware engineers have to design around specific problems, even under a constrained budget. For any algorithm, there will always be a path that custom hardware engineers can take to beat out general purpose hardware. It’s a fundamental limitation of general purpose hardware.
Some years ago ASICs made mining Bitcoin using GPUs uneconomic:
In Bitcoin, if you are using hardware other than Bitcoin-specific ASICs to attack the network, your efficiency is going to drop by a factor of a thousand or more. The hundred thousand dollar attack becomes a hundred million dollar attack. For this reason, we don’t typically worry about things like supercomputers — an entire supercomputer mining Bitcoin is overpowered by a handful ASICs, and the energy costs to produce a full alternate history are strictly prohibitive. If you are going to attack Bitcoin, you need Bitcoin ASICs, end of story.
GPUs are mass-market product manufactured in volumes much greater than were ever used for mining. Yes, mining demand at the margin caused shortages and price increases in the GPU market, but mining was never the main use, and the existence of each new GPU is public. But mining ASICs are a much smaller market; maybe a hundred million or so a year against Nvidia's almost ten billion. And their entire market is miners. It is true that big customers will get new GPUs slightly sooner, but things in the mining ASIC market are very different. For example, Monero's Proof of Work is intended to resist ASICs, but:
A few months ago, it was publicly exposed that ASICs had been developed in secret to mine Monero. My sources say that they had been mining on these secret ASICs since early 2017, and got almost a full year of secret mining in before discovery. The ROI on those secret ASICs was massive, and gave the group more than enough money to try again with other ASIC resistant coins.

It’s estimated that Monero’s secret ASICs made up more than 50% of the hashrate for almost a full year before discovery, and during that time, nobody noticed. During that time, a huge fraction of the Monero issuance was centralizing into the hands of a small group, and a 51% attack could have been executed at any time.
Bitmain is the leading supplier of mining ASICs. While Sia was developing their own ASIC, Bitmain took them by surprise with their competitor, the Antminer A3 chip. Sia estimate this was an incredibly profitable move:
Using Sia as an example, we estimate it cost Bitmain less than $10 million to bring the A3 to market. Within 8 minutes of announcing the A3, Bitmain already had more than $20 million in sales for the hardware they spent $10 million designing and manufacturing. Before any of the miners had made any returns for customers, Bitmain had recovered their full initial investment and more.
But for most customers it was a money-loser:
If a cryptocurrency like Sia has a monthly block reward of $10 million, and a batch of miners is expected to have a shelf life of $120 million, the most you would expect a company could make off of building miners is $120 million. But, manufacturers actually have a way to make substantially more than that.

In the case of Bitmain’s A3, a small batch of miners were sold to the public with a very fast shipping time, less than 10 days. Shortly afterwards, YouTube videos started circulating of people who had bought the miners and were legitimately making $800 per day off of their miner. This created a lot of mania around the A3, setting Bitmain up for a very successful batch 2.

While we don’t know exactly how many A3 units got sold, we suspect that the profit margins they made on their batch 2 sales are greater than the potential block reward from mining using the A3 units. That is to say, Bitmain sold over a hundred million dollars in mining rigs knowing that the block reward was not large enough for their customers to make back that money, even assuming free electricity. And this isn’t the first time, they pulled something similar with the Dash miners. We call it flooding, and it’s another example of the dangerous asymmetry that exists between manufacturers and customers.
GPU manufacturers can't perform these tricks, but mining ASIC manufacturers can. The mining ASIC market, like the cryptocurrency market itself, is completely corrupt and dominated by a few huge players. You need to read both of Vorick's posts to get the full picture of the corruption, this is just a taste.

Vorick concludes:
Though that’s discouraging news, it’s not the end of the world for Bitcoin or other Proof of Work based cryptocurrencies. Decentralization of hashrate is a good-to-have, but there are a large number of other incentives and mechanisms at play that keep monopoly manufacturers in line. .... There are plenty of other tools available to cryptocurrency developers and communities as well to deal with a hostile hashrate base, including hardforks and community splits. The hashrate owners know this, and as a result they are careful not to do anything that would cause a revolt or threaten their healthy profit streams. And now that we know to expect a largely centralized hashrate, we can continue as developers and inventors to work on structures and schemes which are secure even when the hashrate is all pooled into a small number of places.
So despite all the hype about decentralized cryptocurrencies, they aren't. They are dependent upon the self-restraint of a small number of dominant players, who could at any time blow the system up, but don't want to kill the goose that lays the golden egg.

12 comments:

David. said...

David Gerard's Bitcoin’s stupendous power waste is green, apparently — bad excuses for Proof-of-Work demolishes the arguments people make to explain why Bitcoin currently uses 300kWh per transaction to get two to four of them per second. Along the way he makes the same point as Vorick:

"Decentralisation is a hugely important part of the Bitcoin pitch. It is essential to Bitcoin’s political pitch that there can be no central controlling body. If a single miner got 51% of mining power, they could mess with the blockchain in all sorts of ways.

...

The trouble is that proof-of-work has economies of scale. The larger your mining operation, the more efficient it is — the more hashes it can calculate per watt-hour. This means proof-of-work mining naturally centralises.

Mining went from being calculated on computer CPUs, to being calculated on video cards, to being calculated on FPGAs — Field-Programmable Gate Arrays, chips you can program the function of — to ASICs — Application-Specific Integrated Circuits, that do one specific job super-efficiently and nothing else.

By late 2013, ASIC-based miners were coming on line. But by early 2014, one company, Bitmain, made most of the chips, and continues to control cryptocurrency mining. By mid-2014, one mining pool, GHash, had gone over 55% of all mining.

The majority of Bitcoin mining in 2018 is done by only three mining pools. This is central issuance — decentralisation is long dead. But we’re still wasting all that power."

David. said...

Janne M. Korhonen points out that:

"the fundamental economics of Bitcoin mining make it, in fact, one of the least renewables-compatible industrial processes on the planet today. In reality, in most jurisdictions Bitcoin mining most likely promotes increased and continuing use of coal."

David Gerard has the TL;DR:

"inflexible demand, because miners have to run flat-out to compete."

and most renewables provide intermittent supply.

David. said...

"In recent days the nightmare scenario for any cryptocurrency is playing out for Bitcoin Gold, as an attacker has taken control of its blockchain and proceeded to defraud cryptocurrency exchanges. ... Bitcoin Gold has been experiencing double-spending attacks for at least a week, according to forum posts by Bitcoin Gold director of communications Edward Iskra. Someone has taken control of more than half of Bitcoin Gold’s hash rate and is double-spending coins. ... A bunch of other cryptocurrencies have been attacked in similar ways recently. Something called Verge has been hit twice in the last two months, leading to $2.7 million being stolen. The exotic-sounding coins Monacoin and Electroneum have also suffered from 51% attacks not too long ago." reports Joon Ian Wong at Quartz.

Unfortunately, Wong is clueless about the extent to which cryptocurrency mining is already centralized:

"A 51% attack isn’t likely to hit bitcoin any time soon. Bitcoin Gold has a lot less hash rate securing it than bitcoin. Bitcoin miners are contributing about a million times more processing power than Bitcoin Gold miners at the moment." But the majority of that is controlled by three pools, who just don't want to kill the goose that's laying them golden eggs.

David. said...

"In one case this winter, miners from China landed their private jet at the local airport, drove a rental car to the visitor center at the Rocky Reach Dam, just north of Wenatchee, and, according to Chelan County PUD officials, politely asked to see the "dam master because we want to buy some electricity." Bitcoin fever has created other, smaller-scale problems for the utility. Three times a week, on average, utility crews in Chelan County discover unpermitted home miners running computer servers far too large for the electrical grids of residential neighborhoods. In one instance last year, the transformer outside a bootleg miner's home overheated and touched off a grass fire, Chelan County PUD officials say." from the Seattle Times story Bitcoin backlash as 'miners' suck up electricity, stress power grids in Central Washington.

David. said...

David Gerard points to this table of the cost of a 1-hour 51% attack on a range of cryptocurrencies. Note that only Bitcoin and Ethereum among cryptocurrencies with "market cap" over $100M would cost more than $100K to attack. The total "market cap" of these 8 currencies is $271.71B and the total cost to 51% attack them is $1.277M or 0.000047% of their market cap.

David Gerard quotes this post:

“Despite all the hype about decentralized cryptocurrencies, they aren’t. They are dependent upon the self-restraint of a small number of dominant players, who could at any time blow the system up, but don’t want to kill the goose that lays the golden egg.”

David. said...

Akram's Razor has a long, skeptical post entitled Nvidia: Mining for Answers

"For all the talk we got earlier in the year about Bitmain making more money than Nvidia, reality has set in and we now know that’s not remotely true. Bitmain’s CEO recently disclosed that they did $3.5 billion in revenue last year (not 3-4bl in profits). Considering their gross margins are far lower than Nvidia’s, and what we now know about ASIC mining economics thanks to Cannan Creatives IPO filing, Bitmain’s 2017 profits were likely no more than $800ml. As alt coin mania started far later than Bitcoin, Nvidia’s TTM crypto profits likely matched or exceeded Bitmain’s."

David. said...

"At least five cryptocurrencies have recently been hit with an attack that used to be more theoretical than actual, all in the last month. In each case, attackers have been able to amass enough computing power to compromise these smaller networks, rearrange their transactions and abscond with millions of dollars in an effort that's perhaps the crypto equivalent of a bank heist." from Blockchain's Once-Feared 51% Attack Is Now Becoming Regular. This is aided by Mining-as-a-Service:

"Further, zencash co-creator Rob Viglione argued the rise of mining marketplaces, where users can effectively rent mining hardware without buying it, setting it up and running it, has made it easier, since attackers can use it to easily buy up a ton of mining power all at once, without having to spend the time or money to set up their own miners."

David. said...

Right now, two pools apparently owned and operated by Bitmain control 41.2% of the Bitcoin hash rate (BTC.com 24.8%, AntPool 16.4%). Add in SlushPool's 10.6% and you have 51.8%.

David. said...

"To the delight of anyone who's been eying a new graphics card for a while, there seems to be a definitive end in sight to the price-gouging supply/demand effect in the GPU market. In recent months, mining has seemingly died down quite a bit, as a result of cryptocurrency values likewise taking a major turn for the worse." from Rob Williams' Cryptocurrency Nosedive Means Steep Graphics Card Discounts Ahead For Gamers.

David. said...

A flood hit a miningfarm in China shows one reason why buying "gently used" mining rigs or GPUs is a bad idea. But the great thing about cryptocurrencies is eliminating the need for trust.

David. said...

"The Chinese company that makes most of the world’s Bitcoin-mining rigs — as well as a big pile of mining and crypto-trading profit — is thinking about a stock-market listing. ... Bitmain designs and sells the powerful custom chips used to mine cryptocurrencies, but it makes money from mining too. ... Its market share in the former is 80 percent; in the latter it’s 40 percent. ... An IPO could value Bitmain at $40 billion, or 20 times this year’s unverified forecast earnings of $2 billion, according to the news site CoinDesk."

From A $40 Billion Plan to Cash Out Of Bitcoin by Lionel Laurent. Centralization is good business!

David. said...

A BCH Update: Bitmain, BCH, the IPO & What it all Actually Means by "Crypto Herpes Cat" is a fascinating analysis of Bitmain's financial situation, explaining why they may really need to cash out ASAP, but can't because of the general slide in cryptocurrencies. Well worth a read.

Hat tip to David Gerard, who summarizes it thus:

"Bitmain’s bet on Bitcoin Cash hasn’t worked out — their Q2 numbers are terrible because of overinvestment in BCH, they have a million BCH that they can’t turn into actual money without crashing the price even further than it’s already gone down, and they can’t just stop mining BCH without leaving it open to a 51% attack."