Please ensure Javascript is enabled for purposes of website accessibility

What Is a 51% Hash Attack -- and Are You Vulnerable?

By Zhiyuan Sun – Sep 21, 2021 at 8:15AM

Key Points

You’re reading a free article with opinions that may differ from The Motley Fool’s Premium Investing Services. Become a Motley Fool member today to get instant access to our top analyst recommendations, in-depth research, investing resources, and more. Learn More

Hackers have a lot of tools at their disposal when it comes to attacking blockchains.

When it debuted, Bitcoin (BTC -1.04%) was considered innovative as the world's first secured peer-to-peer electronic cash payment system. Its most striking features (compared to other digital money predecessors) were its cryptography and verification process. Without these, Bitcoin would be nothing more than a string of code anyone could copy and paste -- which would quickly break down trust. 

But its novel process for confirming transactions, called proof of work, also has its drawbacks. If an entity, like a government, took control of 51% of the network's hash rate, or mining computational power, it would be able to reverse transactions, block new transactions from taking place, and more. It's not just Bitcoin; altcoins that use a PoW consensus mechanism, such as Ethereum Classic and Bitcoin Gold, have all suffered 51% attacks in the past. So how concerned should you be? 

Binary hash data inside each block with the background containing schematics resembling a flowchart.

Image source: Getty Images.

Hash attack economics 

Starting with the basics, Bitcoin is encrypted by transactions using what's called a Secure Hashing Algorithm 256 (shortened to SHA-256). It is a one-way function, meaning that it's easy for anyone to compute an output (or a value that comes out) using an input (a number that feeds into an algorithm), but it is very difficult to compute the input using the output. For each new block, its network publishes a target hash, and the first miner to compute the correct hash takes the rewards home.  

Right now, the hash rate of the Bitcoin networks stands at 133.494 million terahashes per second. That means mining machines across the globe are making 1.33494 * 10^20 (a 21-digit number) guesses every second as to what the correct hash is to verify blocks.

To put it economically: it would cost over $2 million every hour in electric bills for hackers to launch a 51% hash attack against the Bitcoin network. And that's just the maintenance cost. Hackers would also first have to invest tens of billions of dollars in state-of-the-art computers and circuit machines to build up hundreds of millions of terahashes to mount the offensive. 

But the variables are slightly more accessible for some altcoins. It would cost less than $200,000 per hour and $30,000 per hour for hackers to launch 51% attacks against Litecoin and Bitcoin Cash, respectively. And it would take less than $20,000 per hour to temporarily take over popular privacy coin PoW networks like Dash and ZCash

The real threat 

That brings up the main point: The lower a PoW coin's market cap, the lower its network hash rate, which means it's easier for invaders to attack it. Indeed, it costs as little as $1 an hour to take over 51% of the hash rate for cryptocurrencies trading below a market cap of $10 billion. But correlation does not necessarily equal causation. There are outliers like Dogecoin, which has a huge market cap but may cost as little as $40,900 per hour to control 51% of its hash rate.

Also keep in mind that it's not just hackers who can use 51% hash attacks as a means to an end but also regulatory agencies. Due to its decentralized structure, the industry has a substantial share of scams or fraudulent activity. So don't be surprised if the U.S. Securities and Exchange Commission starts launching it own hash attacks to take regulatory delinquent altcoins offline.

Bitcoin investors shouldn't worry too much about these threats -- but they're something that PoW altcoin investors should at least bear in mind before investing. 

John Mackey, CEO of Whole Foods Market, an Amazon subsidiary, is a member of The Motley Fool's board of directors. Zhiyuan Sun owns shares of Bitcoin and Litecoin. The Motley Fool owns shares of and recommends Amazon and Bitcoin. The Motley Fool recommends the following options: long January 2022 $1,920 calls on Amazon and short January 2022 $1,940 calls on Amazon. The Motley Fool has a disclosure policy.

Stocks Mentioned

Related Articles

Premium Investing Services

Invest better with The Motley Fool. Get stock recommendations, portfolio guidance, and more from The Motley Fool's premium services.