Video - Bitcoin 101 - The Nightmare of a 51 Percent Attack - Part 2 - How to Destroy Bitcoin

There is no greater point of weakness in Bitcoin than a 51% attack. A fifty-one percent attack can shut down the network. This video discusses all the attack vectors available to an attacker. And there are many, even worse, the devastation available is catastrophic. While a 51% attack doesn't appear to offer a lot of financial gain, history is not just made up of rational actors.

James goes through Transaction Denial of Service, Selfish Mining, Monopoly Mining and Double Spending, finding fault with proposed patches and solutions. It is not pretty. As Gavin Andresen says, if someone was able to run a 51% attack "that would be bad". We agree. It would be very bad.


Hello, this is James D'Angelo and welcome to the Bitcoin, 101 blackboard series today.  We're doing part 2 of our two parts series on 51% attacks.  In the first part, we covered how much a 51% attack might cost, highlighting especially the real particular relationship that Bitcoin is developing with chip foundries and semiconductor fabrication plants because we're now kind of relying on them, we're trusting them to not spit out these chips at a very cheap cost to one particular individual or even run the 51% attack themselves.  And as we looked at in the last video, they might be able to do a 51% attack for somewhere in the neighborhood of $20 million or less.  Even at today's hashing rate of 60 pedahashes.  So it's very very important that we understand how Bitcoin is developing this trust relationship with semiconductor fabrication plants, okay.  So we get our ASICS from KnC but that's already two steps removed from the semiconductor fab, okay.
Today, what we're going to look at is if someone was able one malicious attack or one bad guy as Gavin Andresen refers to was able to get 51% of the hashing power, what type of shenanigans would they be able to run, right, what type of bad things could they do and it turns out there's a number of different things.  Most people kind of hear that they could kind of run one double-spent and then we'd find them and ruled them out and get them out of the network.  It's not so clear that's the case, but before we get going with that, let's rewind a little bit and take a look at Gavin Andresen's post from 2012, okay.
So he posted this in May 1st, 2012, his most public statement about 51% attacks and he does a very good job of defining one.  A 51% attack means a bad guy getting as much computing power as the entire rest of the Bitcoin network combined plus a little bit more.  Okay, so just to put that into perspective, right, here is all the big mining pools that we're familiar with BTC guild, Ghash, Eligius, MitMinter and all the others, right.  A 51% attack would mean getting more mining power than all of them combined.  And it sounds completely absurd but as we noticed in our last video, it might not be impossible and it might not be that difficult to do for certain individuals, groups or organizations.
So what you would do to get a 51% attack today you'd have to go over and find out what the hash rate is, right.  And the hash rate today is up at 58, 59, we can even just call it 60.  So today it's at 60 pedahashes, right.  So it's already just significantly bigger than last week or was that 50 pedahases has a lot to do with new chips being produced by these chip foundries and being sold by companies like KnC.  So 60 pedahashes per second.  If you wanted to run a 51% attack, well, clearly if you did 61 pedahashes you would have enough, right, because it's not key that you have 51%, it's just key that you have more than 50%.  And it's real important to realize that a 51% attack is much much worse than a 49% attack and a lot of people get this confused but 49% attacks still leaves some chance that other people can mine a bunch of blocks.  In fact, it leaves a pretty good chance.
With a 51% attack you are guaranteed of being able to run all of these shenanigans that we're referencing today.  And this is partly because of this idea called Selfish Mining.  And Selfish Mining in short, just basically means that when you have successfully mined a block instead of doing the right thing and announcing that block to everybody else on the network you don't announce.  So you keep it quiet.  You don't announce that block and you start working on the next block, okay.  And even if you mine the next one you might not announce it.  And what this does is it plays with Bitcoin's most cherished will and which is longer blockchains, always win.  Okay, so the correct one is just deem by how long it is.  So if you have 51% of the hashing power more hashing power than the rest of network you will eventually, even if you don't win the first block you will eventually create a longer blockchain than the rest of the network because you're just simply hashing fast with them.  So at any given point that you start you will eventually win because you have 51% and that's the general idea and there's some theoretical papers that seem pretty good that says you can gain sort of that 51% advantage even with 33%.  If you do true selfish mining, 100% selfish mining.  But what's important to know is that every one of these attacks require you do some form of selfish mining where you're not announcing blocks as soon as they happen.
So with that said let's go back to Gavin Andresen, right.  Gavin says the Bitcoin Wiki has a good summary of what a 51% attacker can and cannot do.  And we're going to actually check that out in a second, but first run to read the next couple lines so he wrote because these are very important lines.  Remember that Gavin Andresen is not one for hyperbole or overstatement, okay.  So he's very controlled in his statements, but this particular line hold some real power, okay.  One of the things a 51% attacker can do is prevent any transactions or any new blocks from anybody besides themselves from being accepted.
Okay, so every single block and every single transaction is now controlled by the 51% attacker.  This isn't just the simple idea of double spending.  Remember that when you were mining a block, you can choose which transactions to include so you could choose to include no transactions, so you could choose to include just your transactions or you could choose to just eliminate transactions to known addresses.  Say, you wanted to shut off all transactions to  Okay, these are the sort of things a 51% attack can do and it does really bad things for Bitcoin.
Okay, so let's rewind this.  One of the things a 51% attacker can do is prevent any transactions of new blocks from anybody besides themselves from being accepted.  So remember, they're going to win all the block rewards as well.  There's 144 blocks a day and there's 25 Bitcoins in each of those blocks and right now it's around $500 per Bitcoin.  That's a serious amount of financial generation and we'll do that calculation in a second, okay?  Effectively stopping all payments and shutting down the network.  What is shutting down the network mean?  That means shutting down Bitcoin.
Now, say they're running a real cheesy attack and they can only run a 51% attack for an hour.  Well, that means they're shutting down Bitcoin for an hour, but what if they have real financial behind and what if 200 million or 300 million or a billion really is not a big deal to them they can shut down Bitcoin for an awful long time and what's probably going to happen and we'll talk about this in a second, but if they've got 51% of the mining power but they're mining all the blocks.  Other miners are going to have to fall out because they cannot afford to continue mining, so if they can sustain mining all the blocks well then some real things have to be done, some real changes have to be done.  And Gavin addresses some of that in a second.
But first he says and this is a big understatement.  That would be bad, right.  And that's why we named ark episode.  That would be bad.  Yeah, it would be really bad, okay.  So this is a very bad thing.  Now, before we get to look at Gavin's solution which he provides right here and we'll see why it's not an ideal solution.  Let's take a look at this wiki and see what their summary is, right, see if they did anything a little bit differently.
So this is the wiki page that he's referring to and you can find this online and notice they're understating even more.  They're saying the attacker has a lot of power and what they're basically saying is the attacker has more than 50%, right, so greater than 50% or really just a 51% attach which you can have up to 80% of the network, 90% or even a 100% of the networks and we'll talk about in a second, okay.
So let's run through this because this is also really important stuff and there's some understatement even here.  An attacker that controls more than 50% of the networks computing power can for the time that he's in control exclude and modify the ordering of transactions, all transactions.  This allows him to and this is the thing we hear most, he could run a little double spend, he could get his Bitcoins back for that mattress he bought yesterday but that's probably not going to be the goal of someone running a 51% attack, they have bigger things in mind, okay.  So he can reverse transactions that he sends while he's in control.  Sure, he could get a few things for free here and there until the price starts collapsing.  And people start realizing there's double spending and they stop to using Bitcoin.
The real terrible things he can do actually are parts two and three right here.  The first one of these two is he can prevent some or all transactions from gaining confirmations, okay.  So if you're running a 51% attack you could run the stupidest 51% attack and you could just include all your blocks was zero transactions.  And since you've got more of the hashing power in you're eventually going to win, while you've got this zero transaction blocks and when your network gets ahead of the main network you just announce all your zero transaction blocks and all transactions that thought they were confirmed before go back to zero, zero confirmation.  You're not reversing the transactions, you're just putting them at very very high risk because as soon as this happens anyone who spent those Bitcoin with those transactions can now send out another transaction to themselves for those same Bitcoin and if that one eventually wins well then they'll get their Bitcoins back and those transactions will be reversed.  So even though they say you can't reverse other transactions, it really does leave it open for reversing transactions, okay, so zero confirmations are very dangerous area.
So if the 51% attacker is just spitting out lots of blocks with zero transactions this would be as Gavin would suggest, this would be pretty bad.  And this is known as transaction denial of service, okay.  And some people have heard of this as a DOS attack.  So there's a transaction denial of service, all transactions get denied, right, they are not going through the network.  Now, this last one this third one is equally as bad and maybe even more dangerous.  What if they included all the transactions in their blocks and just played really nice guy, right.  Allowing for all transactions to happen just fine, but they didn't let anyone else mine anything else ever again.  So this becomes a mining monopoly.
And this one is very dangerous because this one thwarts the defense mechanism that Gavin posted in 2012, the one that we're going to look at in a second.  So you're allowing for all transactions but you're profiting from the entire bit of mining.  And it turns out that if you're monopolizing something your profit margins are much better so if people are profiting right now from mining think of how much more you'll profit if you're not competing.  So all your hashing power is going directly toward winning blocks.  And just for fun, let's do that calculation right now.  How much would you be earning each day if you actually won every one of the 144 blocks.  So there's approximately 144 blocks in Bitcoin made per day, there's 25 Bitcoins per block and each block is approximately worth today $500.  So 144 blocks per day times 25 Bitcorns times $500 and that equals $1,800,000 per day.  $1,800,000 per day.
That's money that's supporting this mining monopoly and that's at $500.  So if the price goes up you could see it being much much bigger.  So if you were able to maintain this for a month and win every single block for a month and people didn't shut down Bitcoin because you're running some crazy 51% attack.  Well, you'd be rewarded with $54 million.  Now, what's most likely going to happen, right, if people realize there's a 51% attack and all the miners are dropping off, the price is going to tank substantially, but it's really important to know that you couldn't win lots and lots of blocks and there's real advantages towards monopolizing all the mining and still being an honest miner, right.  All you're doing is preventing some or all of the other miners from mining any valid blocks, okay, so this is all things that can be done.
Now, what's interesting is right now Bitcoin has nothing in the protocol to prevent this.  So if there is a 51% attack everyone's just going to start screaming and scrambling around like chickens were out their head.  We don't have a single contingency plan and that's partly because whenever you hear about a 50% attack they go, well, it is expected that no one will attempt it, right, because it doesn't gain them profits.  Well, not all destruction on earth comes from rational actors.  People build missiles, people build bombs, people build things very expensive things to destroy things, okay.  So this would be the equivalent of a financial missile or bomb.  And someone as we know might be interested for certain price in building these things.  So we really really have to consider this and even Gavin Andresen goes in and says sort of the similar thing, right.  He says, of course the risk of introducing a new chain acceptance rule which is this rule he proposes up here have to be weighed against the chances that somebody rich and irrational.  Irrational players in the world of finance and politics, I can't imagine there are any, will try to pull off the attack, low in his opinion.
What is low?  5%.  People are putting a lot of money investing a lot into the infrastructure Bitcoin.  Wouldn't it be great if we could set this up so that possibility was much much much much lower.  No security is 100%, but I do agree that we should build something into the protocol that deters the wanabe attackers.  And there's a million things you could do and we're going to talk about these in different videos, we're definitely going to be looking at what I think's one of the more powerful ones is the possibility of adding some form of proof of stake somewhere in Bitcoin and taboo.  The possibility of even having, I don't know, a ripple consensus algorithm.  And again, these aren't front line defenses.  Proof of works going to work just fine right now but if things start to go bad do we put something into the protocol that relies on history of ownership.  Do we put something in the protocol like the ripple consensus which looks more trusted nodes.  Do we do something else.
The important thing is to realize that no advanced systems on earth rely on just that particular system.  If you go on an airplane there's millions of ways to figure out how to get back to the ground should things fail.  Parachutes, interesting types of landing gear, wheels on the bottom, right, flight isn't the only thing they're relying on.  So it's really important for advanced systems to have some form of protections.  You can put steel doors between you and the pilot to stop from attacks inside the planes so if you've got a car you have antilog brakes, we have airbags, we have all sorts of protective features.  Bitcoin might need to look at adding some sort of protective protocol.
Now, I know most people out there are a bunch of optimists and we think these things will never happen, but they do Hurricane Sandy comes in, MtGox happens, Silk Road goes down.  These things really happen and it's really something to be afraid of.  So we really want to consider what we can do if there's a 51% attack.  Now, let's look quickly at Gavin Andresen's proposal from 2012.  And this is no fair because he did it in 2012, I get to look at it from 2014.  He says, we could do something like ignore a longer chain orphaning the current best chain of the sum of transactions that change much less blah, blah, blah.  Basically, what he's saying is if the attackers not putting in most of the transactions into his block so if he's putting in zero transaction blocks on top of each other or two transaction blocks, he's basically saying if there's big orphaned chains that come in and win the network we should be able to detect those and get rid of them.
And it's a great point, right.  You could do a denial of service attack that way, and his way avoids that.  But what if the attacker includes most transactions 90%, 99% of the transaction, they just leave out 10% of transactions.  Bitcoin with 10% of the transactions falling out or 1% of the transactions falling out is not Bitcoin, okay.  That's just something that is really contrived.  And again, if they have 51% attack they're going to be controlling the mining and they're going to be able to pull off the occasional double spend.
So I hope that most people have been talking about the 51% attack of a better idea about all the stuff you can do with a 51% attack, how devilish and how diabolical it can be.  We don't need to save Bitcoin today, it's not going anywhere today, but this is something that we really really have to be careful of and something that we might start looking to plan for in the future, okay.  So please remember to like comment subscribe, do whatever is you do and we'll hope to see you at the next video.
Written by James DeAngelo on April 20, 2014.