Bitcoin must die

The UN this week released a report urging world governments to take immediate action to mitigate the effects of the coming climate catastrophe. It is no longer a case of whether catastrophe is coming. It is just a matter of how bad it will get. When tackling any problem two approaches can be taken, which are often complementary. The long term approach is to restructure the root causes and so lay the groundwork for lasting change. This takes political will, sacrifice and hard work. But there is also the low-hanging fruit, immediate action that can be taken to get the ball rolling, to make an impact straight away.

The rise of Bitcoin has brought blockchain technology to world attention. Blockchain ledgers are a genuine solution to an important (if often overstated) category of distributed computing problems. But at the heart of Bitcoin is another, older technology called proof-of-work (PoW), and because of this legacy Bitcoin is now a significant contributor to global energy consumption. And unlike other forms of energy consumption, such as aviation fuel or heating oil, Bitcoin could be shut down tomorrow without harming individual lives or the overall economy.

In fact, putting Bitcoin to death will help save both the economy and the environment.

We must be careful to distinguish between blockchain ledgers and proof-of-work, because they are separate things that just happen to have been combined to make Bitcoin. There are energy-efficient ways of managing blockchain ledgers, such as proof-of-stake algorithms. Some of these algorithms are already being implemented by rival cryptocurrency schemes, and such schemes are not the subject of this post. PoW is however the most commonly used mainly because it is simpler to implement, and also because so much of the blockchain ecosystem is built on top of Bitcoin, the first successful implementation.

PoW is obscenely wasteful, consuming more electricity than all of Ireland to generate an endless stream of mathematical garbage. To understand why, we need to understand how this garbage is made.

The guessing game

Proof-of-work is based on mathematical hashing operations that are similar to encryption, only irreversible. Think of encryption like a Rubik’s cube – one sequence of operations will turn a solved cube into a scrambled cube, and the inverse sequence of operations will unscramble it. Every step in the process is perfectly reversible.

Hashing intentionally avoids reversible processes. A good hash algorithm is a mathematical mincer, chewing up its input until it is not only scrambled but effectively destroyed. But if you look at the minute details of the mincemeat produced, different inputs will produce outputs that are (almost) never twice the same. And because this is a precision mathematical mincer, two identical inputs will always produce identical outputs. One can tell that they used to be the same, just not what they used to be the same as. We can identify what input produced a particular output – but only by taking a guess, mincing it up and comparing the scrambled outputs. This brute force guessing game gets tedious very quickly, its difficulty increasing exponentially as the size of the input increases.

So it is usually sufficient to only store and compare a small amount of hash output. This increases the chance that two different inputs will produce the same output (a hash collision), but the probability that any two randomly chosen inputs will collide is small. Just as a partial fingerprint is enough to identify a suspect, even a short hash is sufficient to identify an input to a high degree of confidence. The chances of randomly finding a match for a three digit hash is 999:1. For six digits it is 999999:1. For the most secure hashes in common use today it is 2^256:1 (1 followed by 77 zeros).

Yet these high-security hashes are still just 78 digits long, and can be calculated from an input of unlimited size. Hashing is therefore used wherever one wants to compare two things without revealing in advance what is being compared, and without having to store full size encrypted copies. Digital signatures, password databases, integrity checking, all rely on both the storage efficiency of hashing and its resistance to brute force guesswork.

But what if it was all a game, and we wanted someone to guess the answer? Then we would reduce the size of our hash output until it becomes possible to find a solution by trying every valid input in turn. We generate a target output by some prearranged method and challenge our gamers to find an input that produces it. This solution would not be unique – for every output there are an infinite number of possible inputs because we have not specified a particular size, and doing so may inadvertently make the puzzle impossible. The crucial feature is that solutions are hard to find, but once found are easy to check.

The solution itself is worthless trivia, useless for anything other than proving that you really did the hard work searching for it.

Lighting a cigar with a $100 bill

Such proof-of-work games serve one purpose only, to be a public demonstration of computational excess. One early antispam proposal, called Hashcash, proposed that every email sent should have a PoW solution attached. The puzzle would depend on the full details of the email in question, meaning it had to be computed afresh for every message and every recipient. Any email without a valid PoW solution attached would be treated as spam. The difficulty would be calibrated so that sending small volumes of email would be mildly inconvenienced, but a high-volume low-margin spam campaign would be prohibitively expensive.

Hashcash was never used for antispam, but it was reborn a decade later as a way to ensure that only one block of transactions at a time could be written to the Bitcoin public ledger. To add a new block, one of the self-appointed accountants of Bitcoin must solve a Hashcash puzzle generated using the contents of previous blocks. The solution then becomes part of the puzzle for the next block, ensuring that transactions are appended in a strict sequence and inconsistencies can be immediately detected. So long as no one person owns enough computational power to find two valid but contradictory solutions in less time than it takes someone else to find just one, inconsistent (i.e. fraudulent) transactions can be immediately detected and deleted.

Crucially, being the first to solve the puzzle gives the winner the right to create (or “mine”) some new bitcoins, a lucrative prize. And this is where economics takes over. If you give people money for solving useless puzzles, they will solve useless puzzles day and night so long as the prize money exceeds the costs. And as the price of bitcoin has soared, so more people have decided to play the hashcash game, by investing in ever larger, ever more electricity-hungry mining computers.

Equilibrium is reached when the total value of bitcoins mined globally per day matches the total cost of running the equipment. And since Bitcoin is designed to self-regulate so that new coins are produced at a roughly constant rate, the total value of coins mined depends almost entirely on the bitcoin exchange rate. The higher the price of bitcoin, the more mining is done, the more electricity is consumed, and the more mathematical garbage is calculated.

The unintended consequence of this is that the Bitcoin blockchain will consume as much electricity as Austria by the end of this year.

Ashes to ashes

If you turn gold into a coin, the gold still exists. Resources have not been destroyed, just altered. If you turn paper into a banknote you spend some resources to get it printed, but many times less than its face value, and when the banking system collapses you can use the banknote for toilet paper – because that’s all it ever was. If you use electricity to solve a hashcash puzzle, the valuable (and polluting) ton of fuel that was burned to generate it is gone forever, yet the puzzle solution contains no value outside the Bitcoin system. It thereby combines the worst of both gold-backed and fiat currency.

Unlike gold coinage, which is expensive to produce but also represents an independent store of wealth, or fiat currency that has no intrinsic value but is cheap to produce, Bitcoin is neither cheap to make nor a reliable store of value. It is unique among modern currencies because its value depends not on how much wealth its backers have locked away in a safe, or on how much wealth is contained in their national economy, but on how much wealth they have set on fire.

There is a historical precedent though. In many pre-industrial societies cowry shells were used as currency. This had the unfortunate side effect that you could literally fish money out of the sea. In more advanced shell currencies, the shells had to be laboriously worked in order to make them valuable. This stabilised the currency, but only by pegging it directly to the value of the hours spent grinding down shells by hand, time that could have been more productively used elsewhere.

And this is why Bitcoin, and all other proof-of-work schemes, must die. It is the computational equivalent of shell currency, the only difference being that the value is dependent on electricity consumed rather than hours worked. Shell currencies, like rhino horns and tiger bones, are objectively worthless and irrational demand for them is an immoral waste of resources, both human and environmental.

Hashcash puzzles are objectively worthless, but irrational demand for them is incinerating the earth.

Calling time

Proof-of-work cryptocurrencies like Bitcoin are vulnerable both politically and practically. They are politically exposed because many countries, including China, are already cracking down on the use of Bitcoin for a variety of reasons, not limited to its wastefulness. They are also practically vulnerable because you can’t easily buy Bitcoin without a bank account or credit card, and banks can simply refuse (or be forbidden) to do business with proof-of-work schemes. Shuttering Bitcoin could therefore be done within the existing framework of international banking regulation.

If Bitcoin were to cease trading tomorrow, 0.5% of the world’s electricity demand would simply disappear. This is roughly equivalent to the output of ten coal-fired power plants, emitting 50 million tonnes of CO2 per year – which would cover one year’s worth of the carbon emission cuts required to limit temperature rises this century to 2C. It is not a solution by itself, but it would be a good year’s work.

Bitcoin is made from ashes, and if ashes were legal tender, humanity would burn everything in sight and call it progress.

This article was originally published on Slugger.

Evidence-based policy

I heard earlier on the news that Alan Johnson has sacked David Nutt as chairman of the Advisory Council on the Misuse of Drugs, after he published this paper criticising the current drugs classification policy in the UK. To someone who has been following what passes for debate in this area for years, Professor Nutt has said little that comes as a surprise. However, after Nutt disagreed publicly with two Home Secretaries in as many years, Johnson has done what all politicians do in such circumstances and shot the messenger.

What chance is there for practical solutions to society’s worst problems when the highest powers in the land put their fingers in their ears and sing “la la la” any time they’re told things they don’t want to hear? It is clear that politicians don’t regard scientific research as a tool to inform the decision-making process. Instead, scientific evidence is treated with the same respect as criminal evidence often was in the bad old days of the ’70s. Call it the Gene Hunt method of policy formation. The politician already “knows” what the policy should be, and the only acceptable evidence is that which supports the right answer. The system continues safely on without its paradigms being shifted, and bad policy keeps getting implemented in the face of overwhelming evidence that it doesn’t work.

It took years of campaigning and appeals to correct the wrongs perpetrated by the Gene Hunt method of police investigation, and times have thankfully changed for the better. But the Gene Hunt method lives on in policy formulation, which isn’t subject to appeal or judicial review. Who will take the side of the plain, unvarnished truth in the court of public opinion? Not government ministers, that’s for sure.