Video - Bitcoin 101 - Understanding Bitcoin pt. 3 of 3 - A Beginners Guide With Help from Wikipedia

With terms like double spending, decentralized computing and cryptocurrency, it often feels like one might need a PhD just to read wikipedia. Our humble goal is to help you get through the first paragraph and get a full grasp of these terms. So, sit back, relax, in due time you'll be understanding this amazing new currency like a bitcoin insider.

TRANSCRIPT

Hello! This is James D'Angelo. And welcome to the Bitcoin 101 blackboard series. Today we're going to be doing part 3 of this three-part series just covering the first paragraph in the Wikipedia page about Bitcoin. And we've already done things on the blockchain.

Probably the most important idea of Bitcoin but today we're going to be looking at one of the main frameworks for protecting the blockchain called proof-of-work. An idea invented in 1997 by a guy named Adam Back and Satoshi Nakamoto incorporated this idea as the main framework, the most bizarre framework for protecting Bitcoin. So it's imperative to understand this to understand Bitcoin. And remember this isn't going to be a technical discussion. This is just going to give you an idea for how this works. We're not going to be going into the details of how SHA-256 works. We're not going to be looking at digital signatures on an internal level. That save for other videos. This is just to give you a flavor for how the idea of proof-of-work works. Proof-of-work works. So check it out.

Now that we've gotten a pretty good idea about the blockchain and some of these other ideas we really need to get through this idea of proof-of-work and how it applies to the world of mining and how it all ties in with the blockchain. Well, as we've talked about there's these buckets. And each miner, each person processing transactions each person that has opened the Bitcoin QT software and let it run on their computer, each miner has got their bucket and they're receiving all the transactions. Every transaction that's taking place even as we're talking, there is seven or so transactions a second just dumping into this buffer. This 10 minute or so buffer. And as we talked about is that the network doesn't propagate exactly the way we think.

So the guy in Japan may end up with different transactions in his bucket from the guy in Brazil. And so his transactions over those 10 minutes might be slightly different in his buffer and keep in mind there's hundreds of thousands of people mining. Now the miners are there for a reason. They're there for this reward. They're there because they know that if they leave their computers on processing the transactions Bitcoin will send out 25 Bitcoins every 10 minutes so the computer that wins the lottery. Well, that lottery is really the winning bucket. So remember if transactions are sent to Japan and sent to Brazil and they're slightly different. So say I sent to Dave the same $10 that I sent to Veggie Galaxy.

Well, then these two buckets have different transactions in them. But the Bitcoin network says that it doesn't care because these are zero confirmation transactions. So they don't care if Dave gets the money or Veggie Galaxy gets the money. And they don't care if neither of them get the money. So if I try and double spend they both end in the same bucket they get thrown out. The only thing that Bitcoin cares about remember -- it's in amoral system. It doesn't care about you. It doesn't care about me but it won't ever try and arbitrate with you either.

The only thing it cares about is that the same money doesn't go to both. That's the only thing that Bitcoin network cares about. So as these guys are mining and processing their transactions they want to win this mining prize and pour their wet cement on top of the blockchain. And remember these things, 300,000 blocks hot and if they're the winner then every computer on the Bitcoin network now has to update their ledger not with their buffer which they now have to throw out. Because say the guy in Japan won. They have to throw out all their processing and just accept on their blockchain, on their ledger the new block from Japan. So this is the winning block and this gets 25 Bitcoins.

So even though you tried, you lost. So how is this decided. Miners all want to win, the 25 Bitcoins is a great reward. This keeps hundreds of thousands of computers processing these transactions. Well, how does this all work? What you could see that would happen. away is that everyone would try to send their bucket to the top of the blockchain to win the prize. And you've got a hundred thousand computers all trying to send their bucket. They're saying I process the transactions, they didn't even really care about them or whatever they did, they're just all sending them and this top of the blockchain is getting basically spammed and onslaught with everybody's bucket. Well, this was a problem. If everyone is trying to agree on one ledger and there's a prize for adding to that ledger.

Well, everyone's going to want to win that price. It would be all sorts of shenanigans to try and win that prize. Also it's a malware, computer hacking. Well, what Satoshi Nakamoto did is he took an idea from 1997 to limit spamming on emails and this idea is called Hashcash and this isn't another type of digital currency. Hashcash is basically a price you send for sending an email and the price was computational power equals a price. So if you wanted to send a hundred thousand emails you had to do much more computational work than if you were going to send one and the way this is accomplished, the way Adam Back developed this is he made the computer that's sending the email it would have to solve a puzzle.

Now remember computers are very good at solving puzzles. So this puzzle became very, very hard to solve. And it was so hard that it took a regular computer like my computer to solve this puzzle a couple seconds. Two seconds to solve. Well, that doesn't seem like a big deal if you're sending one email and you want to spam one person two seconds is not a big deal. The issue is if you want to spam a lot of people, well, then it becomes a very big deal. Say you want to send a million spam emails and each one of those computers insisted that you solve the Hashcash puzzle.

Well, now you're talking two million seconds of computational power. This really slows down spam, spaming. Now the nice thing about puzzles is that they're pretty hard to do. So say you got a 500 piece floor puzzle of the mountains in Austria for example, you've got all these tiny little pieces all over the place and takes you a long time to do. So they're very hard to do but they're very easy to verify. So all you have to do is take one quick look at the puzzle to know if it's been done right. So that's the same thing that Adam Back use for his Hashcash. He used a very hard to do puzzle, very difficult to do but very easy to verify. And the same can be said of like a padlock.

So, say, you have a padlock you don't know the combination. And someone needs to open it. Well, that's a really tough puzzle and it turns out that the average padlock has around 200,000 possible combinations. So if I just put someone in a room and told them they had to get that padlock open by turning combinations until it was open they're likely to figure it out after turning a hundred thousand combinations. Well, if a hundred thousand combinations each take around 10 seconds a piece. Well, you're talking around 15 days until they'll get the padlock open. But once they do they can tell you the number. Say it was 34-26-7.

They can not only give you the code of what they did but they can also do one other thing, they can show you that the padlocks open. So you know in one second that their 15 days of work was valid. The padlocks open, you have the code. You can redo it again. This is exactly how proof-of-work works in Bitcoin to prevent sort of the spamming of the blockchain. Every miner just trying to screen that they've solved transactions, everyone trying to win those 25 Bitcoins. What they do is they basically hand out the exact same padlock.

And this particular padlock they're handing out is a SHA-256 puzzle based on the transactions in the buffer that takes an average computer maybe a year and a half to solve. But the computers just plugging in random numbers. So if you have hundreds of thousands of those computers it's likely that one of those computers on the network will solve it in around 10 minutes. And this is how the clock works. The Bitcoin network isn't saying we're going to give out a prize every 10 minutes. The Bitcoin network insists that you solve a puzzle that takes approximately 10 minutes for the entire network to solve. So if anyone computer was working by itself plugging in random numbers. Well, there would be a new block every two years.

But with all the computers together fighting to solve that one of them gets lucky, one of them basically turns that combo that turns the combination lock in the first few minutes and then all they have to do to let the network know that they succeeded is all they have to do is broadcast their combination, their successful winning combination., 34-26-7. As soon as that's done every other miner on the network, the losing miners over there can turn that combination go, ah! That blocks been solved.

Those Bitcoins go to the guy in Japan who turn that lock faster than I did and that block from the Japanese guy is now on top of the blockchain. Bing! Let's start working on the transactions that have just happened. And so the puzzle starts over again. And that's proof-of-work that gives you a little bit of an idea of what's going on with mining but we're just going to talk about mining in particular for one second because it's so important and all the ideas, Satoshi Nakamoto managed to put four main ideas into one idea of mining.

So just a couple quick notes on miners until we finish this video because it's so important to think about how involved they are. Remember miners are the guys who are processing the transactions. Everyone is filling these buckets trying to solve the combination lock for their particular bucket and trying to add the transactions on to the top of the ledger. And they want to be the person that puts the most recent block the last 10 minutes of transactions on top of the ledger because then they'll win 25 Bitcoins. And that's why they call it mining. Because if you work hard enough, if you put enough computing power in it you're more likely to turn that combination lock faster and as a result you're more likely to win these 25 Bitcoins. It's gotten very difficult to win these Bitcoins because there are so many miners involved.

And so your chances might be one in a hundred thousand of winning the entire lottery any 10 minutes but these miners are valuable because they're replacing the bank. And remember the bank is paying for the electricity. When you walk in and use an ATM, an ATM is just a computer and that computer is paid for by the bank, maintained by the bank, protected by the bank. All that security glass. All the people working behind it. All the people programming it and it's even bought by the bank. So that computer sitting there working to process your transactions. Bitcoin doesn't have a bank. Doesn't want to bank. It needs to have computers processing these transactions. It needs to be backing itself up. Well, because it's decentralized its backing itself up a hundred thousand times better than any bank. But who's going to pay to use the computers. Well, that's the miners. And they're paying to use it because, well, they're kind of selfish. They want to win the prize. Most miners aren't getting involved because they believe in Bitcoin and they believe in the Bitcoin network and it's really Bitcoin touches on their individual greed, the chance to win this cool little lottery.

So the more computing power they provide the more likely they're going to win that ticket. But because of their selfishness and this is how capitalism works, because of their selfishness they end up contributing into the system. And Satoshi Nakamoto work very hard to juggle incentives and protection as he was building the Bitcoin network. But because they're paying for the computers and maintaining the computers and trying to make their computers ever faster these miners all together are working very well as a bank and so we talk about that here. The bank has power, electricity, maintenance and computers. So miners work as the bank. And the software allows you to do all the transactions that you might do with a bank.

Well, the miners also work as the Supreme Court and we talked about that in the previous episode but remember Bitcoin is open source and so everything, every rule that it follows is agreed to by all the miners. They're the people who basically vote. If they decide to not work on blocks for that blockchain they're saying that they don't agree with that blockchain. So if someone changes the open source and it gets changed fairly often and the miners decide not to switch their software they're basically saying we don't agree with that change. Now anything in the Bitcoin system can be changed but remember that because there are so much incentive for the miners to maintain the network because they've now invested hardware, specialized hardware in many cases that they don't want Bitcoin to destabilize.

They don't want to see the price fall so they're going to be very conservative. So miners are this conservative and they're going to be judges of all new software that gets released. So these miners become this Supreme Court that's judging all upgrades on the software. And right now we're at version 0.86 as we talked about we're about to go to version 0.9. We're not even at version one of Bitcoin. It's worth $10 billion. It's exciting the whole world and we're not even at version. And we probably will likely not get to version one for another year or so. That's partly because Gavin Andresen and the people who are doing most of the program are conservative. They don't want people to believe and hype. They don't want them to feel fooled. They want you to understand that this is still an idea that is new and it's still being worked on and that's true.

Bitcoin is new. Tomorrow it could fail. It could fail miserably, go completely to zero. Someone figured out how to crack it. It seems less likely each day that passes and the more miners that are involved are actually protecting the system. But miners also work like the Federal Reserve. Because remember as we talked about these are virgin Bitcoins that are being introduced for building on the blockchain. This is how new money is introduced into the Bitcoin system and what's happening is every 10 minutes or so 25 Bitcoins go into the system until we reach a total of around 21 million Bitcoins. And there's an algorithm the amount will drop every few years but the final value will be 21 million Bitcoins. After that point the only thing that's going to incentivize our greedy miners are the transaction fees.

And right now the transaction fees seem pretty low. So if I send something, my Veggie Galaxy transaction that's costing me a fraction of a cent. But a fraction of a cent in the Bitcoin network if you took all the transaction fees together you're talking a few dollars. It's not a lot but Bitcoin is still young. If it gets up into the area of Visa or PayPal or MasterCard, you're talking lots and lots of transactions and lots and lots of pennies added up could end up being a real reward that will now be given every 10 minutes to miners. So a lot of people wonder what will happen when all the Bitcoins have been introduced in the system, there's no new coins. Well, the miners will continue plugging away because they'll be surviving off of now the much bigger Bitcoin network.

Getting a lot more transaction fees. So there might even be a bigger reward in those years because of all the transaction that will happen. Because right now bitcoin is what? It maxes out at seven transactions a second. We may be looking in the future as Bitcoin scales up to 7,000 transactions a second. And so all those accumulated transaction fees will add up and as I probably mentioned transaction fees are actually very good for a system because they prevent transaction spam. And they work a little bit like proof-of-work instead of charging your computer to do processing you're charging people in their pocket to send out fraudulent transactions. If it's going to fail and it's going to cost money they're going to do a lot less of it. So transaction fees, those small are a good thing on this crazy network, the sea of malware.

So we've talked about the Federal Reserve, Supreme Court, bank power. Now let's just touch on the Department of Defense. How are miners protecting the Bitcoin network? And this is kind of abstract but keep in mind that we've got hundreds of thousands of computers all trying to solve this puzzle and when one of them gets the puzzle they attach the code to that puzzle in their transaction block. Now it took a hundred thousand computers to solve that puzzle in around 10 minutes. And any computer working by itself would take about two years to solve that puzzle. But you need that code inside the transaction blockchain and every block has a solution to the puzzle. So here is a solution to the puzzle. Here's another solution. Every block needs a solution included with the transactions. And remember those solutions take 10 minutes on this computer network. But the Bitcoin network right now is the biggest computer network in the world working on one problem.

So if you took all the supercomputers in the world and lash them together they wouldn't be as fast at solving this puzzle as Bitcoin network. And this is how all the mining together protects a network. So if you're an individual attacker just working with one computer to create these codes it would take so long that no one's going to accept what you're doing. Because if you're trying to work on this block, today's block, and you up with a solution in 10 years. Well, we've already passed you. We're not interested in that block from way back when. So if you're trying to send some fraudulent things, if you're trying to play with the Bitcoin network, well, you got to compete now with these hundred thousand computers and they talk about this in the Bitcoin world in terms of hashes. Because the problem that Bitcoin computers are solving is called a hash. It's the SHA-256 hash.

And one hash takes a computer a little bit of work and the whole Bitcoin network is now protected by the computing power that can do petahashes per second. And just to put that in comparison my computer, which is a fairly modern MacBook can do mega hashes per second. And peta is 15 zeros. The network actually can do 5 petahashes so the network can do 5, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15. It can do five petahashes. My computer working all by its lonesome can probably do 2 mega hashes so can do this. So I would need around two billion of my computers all lashed together to start to fight the Bitcoin network. And that's what's protecting the Bitcoin network is this massive, massive computing power protected by these coded puzzles. And it's the most bizarre thing but this is the genius invention of Satoshi Nakamoto building on Adam Back's Hashcash to protect this ledger that's sitting in the middle of the ether.

It's being protected by no person individually. It's being protected by people's greed. Their avarice for 25 Bitcoins every 10 minutes. It's being protected by the schemes that Satoshi Nakamoto put together. It's really, really phenomenal stuff and we're going to talk a lot about hashing. We're going to talk a lot more about proof-of-work in other videos but hopefully now you're getting a feel for how insane this mining is and how many roles they play in the Bitcoin network and all you have to do is download Bitcoin QT software.

Click, go and you become a miner. You're not going to get rich doing so unless you invest a lot in the hardware but you'll be part of this. You'll be part of the Federal Reserve, the Department of Defense, the Supreme Court and the banking. And it's quite an honor to be part of this madness, this wild revolution.
So hopefully now you have a good feel for all the things that we've talked about. Transactions are verified by a decentralized network. Specialized computers use proof-of-work system, double spending, digital currency, miners, petahashes, the blockchain, proof-of-work, okay.

Hopefully you've got a flavor for all these ideas in this first paragraph of the Wikipedia page. Please remember to like, subscribe, comment, do whatever it is you do and we'll catch you at the next video.

Written by James DeAngelo on January 5, 2014.