WEBVTT 00:00:00.638 --> 00:00:03.404 Voiceover: Bitcoin is a new virtual currency system 00:00:03.404 --> 00:00:05.546 that's been gathering a lot of attention recently, 00:00:05.546 --> 00:00:07.043 and I thought I would do a series of videos 00:00:07.043 --> 00:00:10.010 where I really dive into the innards of bitcoin 00:00:10.010 --> 00:00:12.621 and explain how it works in detail, 00:00:12.621 --> 00:00:15.768 and my plan for this first video in this series 00:00:15.768 --> 00:00:18.214 is to describe some of those mechanics 00:00:18.214 --> 00:00:19.603 at a high level. 00:00:19.603 --> 00:00:21.201 And then what I'll do in subsequent videos 00:00:21.201 --> 00:00:24.548 is dive a bit deeper into all of the underlying aspects 00:00:24.548 --> 00:00:27.340 that I have touched upon within this first video. 00:00:27.340 --> 00:00:29.607 And my hope is that by the end of this video series, 00:00:29.607 --> 00:00:31.955 you'll know not only what a bitcoin is, 00:00:31.955 --> 00:00:33.575 but you'll also understand the mechanics 00:00:33.575 --> 00:00:35.872 of how transactions are initiated. 00:00:35.872 --> 00:00:38.048 You'll see how verification occurs 00:00:38.048 --> 00:00:38.860 for those transactions, 00:00:38.860 --> 00:00:41.500 and you'll also learn what it means for someone 00:00:41.500 --> 00:00:43.126 to really engage in a process 00:00:43.126 --> 00:00:44.882 known as "bitcoin mining", 00:00:44.882 --> 00:00:46.462 and that may be a term that you've heard 00:00:46.462 --> 00:00:49.392 if you've had any interest in bitcoin recently. 00:00:49.392 --> 00:00:50.629 I do want to point out, also, 00:00:50.629 --> 00:00:53.507 that the bitcoin scheme is fairly involved. 00:00:53.507 --> 00:00:56.627 It requires some time to really cover 00:00:56.627 --> 00:00:58.072 all of the relevant details, 00:00:58.072 --> 00:01:00.818 and to me the best way to really wrap your head 00:01:00.818 --> 00:01:02.474 around a scheme like bitcoin 00:01:02.474 --> 00:01:04.954 is to really suspend belief for a bit 00:01:04.954 --> 00:01:08.248 and get exposed to all of these relevant details. 00:01:08.248 --> 00:01:10.303 Now, undoubtedly, you'll have a lot of questions 00:01:10.303 --> 00:01:11.288 along the way, 00:01:11.288 --> 00:01:13.502 but my hope is that by the end of this video series, 00:01:13.502 --> 00:01:16.265 all of the relevant stones will have been overturned 00:01:16.265 --> 00:01:17.517 and your questions will have been 00:01:17.517 --> 00:01:18.909 appropriately answered, 00:01:18.909 --> 00:01:21.240 but it might take some time to get there, 00:01:21.240 --> 00:01:23.902 and in part, that's because I'll try to describe things 00:01:23.902 --> 00:01:25.127 in a way that's sensible 00:01:25.127 --> 00:01:28.413 and that might involve leaving some details out 00:01:28.413 --> 00:01:31.216 until I can explain enough pieces of the scheme 00:01:31.216 --> 00:01:33.718 and then add in those details in as I go along 00:01:33.718 --> 00:01:34.880 so that you're not inundated 00:01:34.880 --> 00:01:38.072 with too many minor points and nuances 00:01:38.072 --> 00:01:39.127 along the way, 00:01:39.127 --> 00:01:41.003 but you get a feel for the overall system 00:01:41.003 --> 00:01:42.726 as I go through things. 00:01:42.726 --> 00:01:44.962 With that, let me go ahead and just dive right in. 00:01:44.962 --> 00:01:46.371 First of all, I do want to point out 00:01:46.371 --> 00:01:48.737 that bitcoin has been described, really, 00:01:48.737 --> 00:01:51.293 as a decentralized currency 00:01:51.293 --> 00:01:54.321 because there's no real central bank or entity 00:01:54.321 --> 00:01:57.794 that's involved in generating or transacting bitcoins, 00:01:57.794 --> 00:02:00.432 and, in fact, what happens in the content of a bitcoin 00:02:00.432 --> 00:02:02.611 is all the transactions really require 00:02:02.611 --> 00:02:04.210 what's known as a peer-to-peer network, 00:02:04.210 --> 00:02:08.153 a network of just individual hosts that essentially 00:02:08.153 --> 00:02:09.672 collectively agree on different aspects 00:02:09.672 --> 00:02:14.294 of how the protocol is implemented and used. 00:02:15.477 --> 00:02:17.400 Bitcoin itself is also referred to sometimes 00:02:17.400 --> 00:02:19.007 as a cryptocurrency, 00:02:19.007 --> 00:02:19.957 and by a cryptocurrency, 00:02:19.957 --> 00:02:22.939 I mean that we use a lot of cryptographic techniques 00:02:22.939 --> 00:02:25.681 in order to facilitate or to really enable 00:02:25.681 --> 00:02:27.307 bitcoin transactions to take place, 00:02:27.307 --> 00:02:28.531 and I'll do separate videos 00:02:28.531 --> 00:02:29.887 on some of these techniques, 00:02:29.887 --> 00:02:31.855 but just take it at face value right now, 00:02:31.855 --> 00:02:33.122 that it's decentralized 00:02:33.122 --> 00:02:35.642 and is a type of cryptocurrency. 00:02:35.642 --> 00:02:38.221 I also want to point out that the term "bitcoin" itself 00:02:38.221 --> 00:02:40.897 can in fact be a bit confusing, 00:02:40.897 --> 00:02:42.831 and in many ways, bitcoin transactions 00:02:42.831 --> 00:02:46.418 don't really resemble traditional coin transactions 00:02:46.418 --> 00:02:49.040 so much as they represent really entries 00:02:49.040 --> 00:02:51.954 in some type of a global ledger, 00:02:51.954 --> 00:02:54.654 and by that, I mean let's say you have 00:02:54.654 --> 00:02:56.250 a transaction taking place, 00:02:56.250 --> 00:02:58.341 and let's say the transaction is taking place 00:02:58.341 --> 00:03:00.682 within, or among two parties, 00:03:00.682 --> 00:03:03.437 and we'll call them Alice and Bob, 00:03:03.437 --> 00:03:04.888 which are traditional names that are used 00:03:04.888 --> 00:03:06.567 in many cryptographic protocols 00:03:06.567 --> 00:03:08.965 to describe the parties involved, 00:03:08.965 --> 00:03:12.155 and imagine that Alice wants to transfer, 00:03:12.155 --> 00:03:13.722 or really wants to assign, 00:03:13.722 --> 00:03:15.763 a certain number of bitcoins that she possesses 00:03:15.763 --> 00:03:17.603 over to Bob, 00:03:17.787 --> 00:03:19.277 and you can think of this transaction, really, 00:03:19.277 --> 00:03:23.481 as an entry in a ledger of some sort, 00:03:24.233 --> 00:03:26.289 and I also want to point out before proceeding 00:03:26.289 --> 00:03:28.103 that even though I've used terms 00:03:28.103 --> 00:03:29.776 like Alice and Bob, 00:03:29.776 --> 00:03:32.288 what I really mean in the context of bitcoin 00:03:32.288 --> 00:03:36.469 is not the actual identities in the physical sense, 00:03:36.469 --> 00:03:39.847 but really that Alice and Bob are identities 00:03:39.847 --> 00:03:41.176 in the bitcoin system, 00:03:41.176 --> 00:03:42.802 and these identities are just, 00:03:42.802 --> 00:03:44.805 in actual implementation, 00:03:44.805 --> 00:03:46.609 are just collections of numbers 00:03:46.609 --> 00:03:49.003 that do not have to be tied 00:03:49.003 --> 00:03:52.631 with Alice and Bob's real-world identities. 00:03:52.631 --> 00:03:55.887 In that capacity, you can think of bitcoin at any, 00:03:55.887 --> 00:03:57.392 it really is effectively being, 00:03:57.392 --> 00:03:59.432 of being pseudonyms, 00:03:59.432 --> 00:04:00.599 rather than real names, 00:04:00.599 --> 00:04:02.361 and the idea is that bitcoin really becomes more 00:04:02.361 --> 00:04:03.958 of a pseudonymous protocol, 00:04:03.958 --> 00:04:06.565 where people are addressed by their pseudonyms, 00:04:06.565 --> 00:04:08.985 and that provides some level of privacy 00:04:09.139 --> 00:04:10.388 to users that want to transact 00:04:10.388 --> 00:04:12.619 using the bitcoin system. 00:04:13.510 --> 00:04:15.665 Now, in a transaction between Alice and Bob, 00:04:15.665 --> 00:04:16.849 what Alice will basically do 00:04:16.849 --> 00:04:18.546 is specify a few different numbers. 00:04:18.546 --> 00:04:21.127 She has to specify how many bitcoins 00:04:21.127 --> 00:04:22.594 she wants to allocate to Bob. 00:04:22.594 --> 00:04:24.861 Let's say Alice started off with 50 bitcoins of her own. 00:04:25.215 --> 00:04:27.209 She might decide that she wants to give, 00:04:27.209 --> 00:04:30.949 let's say, 30 of these bitcoins over to Bob, 00:04:31.609 --> 00:04:33.724 and let's say she wants to have 00:04:33.724 --> 00:04:35.286 some number of bitcoins returned back to her, 00:04:35.286 --> 00:04:36.195 so you have to specify, 00:04:36.195 --> 00:04:37.787 or Alice has to specify, rather, 00:04:37.787 --> 00:04:39.278 how much change she's going to get, 00:04:39.278 --> 00:04:40.855 so in this case, let's say her change is going to be 00:04:40.855 --> 00:04:43.036 18 bitcoins for herself, 00:04:43.036 --> 00:04:45.461 and then the remaining 2 bitcoins are going to be 00:04:45.845 --> 00:04:47.573 a transaction fee, 00:04:47.573 --> 00:04:50.582 and we'll talk about what a transaction fee means 00:04:50.982 --> 00:04:51.722 a little later, 00:04:51.722 --> 00:04:54.137 and I think I'll also dive into it in future videos, 00:04:54.137 --> 00:04:56.830 but it's basically an incentive for other nodes 00:04:56.830 --> 00:04:58.858 in the bitcoin network to help Alice 00:04:58.858 --> 00:05:00.893 in essentially validating some of the details 00:05:00.893 --> 00:05:04.099 of this transaction for Bob. 00:05:04.684 --> 00:05:07.236 Now, Alice will take these transaction details 00:05:07.236 --> 00:05:12.111 and apply what's known as a digital signature 00:05:12.111 --> 00:05:13.573 to these transaction details, 00:05:13.573 --> 00:05:14.992 and a digital signature is basically 00:05:14.992 --> 00:05:18.109 the mathematical analog of a traditional signature. 00:05:18.109 --> 00:05:21.498 It really binds Alice's identity to the details 00:05:21.498 --> 00:05:23.002 of this transaction. 00:05:23.002 --> 00:05:24.495 And by Alice's identity, again, 00:05:24.495 --> 00:05:27.552 I mean her identity within the bitcoin system, 00:05:27.552 --> 00:05:28.850 and this binding is really done 00:05:28.850 --> 00:05:31.824 in a cryptographically strong way. 00:05:31.824 --> 00:05:33.517 Now, the details of this transaction 00:05:33.517 --> 00:05:34.966 once it takes place, 00:05:34.966 --> 00:05:36.818 are going to be broadcast out, 00:05:36.818 --> 00:05:38.726 so Alice is going to take these transaction details 00:05:38.726 --> 00:05:40.790 and effectively just broadcast them out 00:05:40.790 --> 00:05:44.842 to all the nodes in the peer-to-peer network 00:05:45.149 --> 00:05:47.672 that represent bitcoin nodes. 00:05:47.672 --> 00:05:50.624 Now, Bob, when he receives information 00:05:50.624 --> 00:05:51.719 about this transaction, 00:05:51.719 --> 00:05:53.833 he receives it over the peer-to-peer network. 00:05:53.833 --> 00:05:55.271 He'll probably sandy check 00:05:55.271 --> 00:05:56.621 some part of the transaction. 00:05:56.621 --> 00:05:58.817 For example, he might check that the numbers 00:05:58.817 --> 00:05:59.633 work out correctly, 00:05:59.633 --> 00:06:02.272 that Alice, let's say, started off with 50 bitcoins 00:06:02.272 --> 00:06:03.272 and is not trying to transfer 00:06:03.272 --> 00:06:06.365 more than 50 bitcoins to him, and so on and so forth. 00:06:06.365 --> 00:06:08.955 He's going to have some mathematical assurance 00:06:08.955 --> 00:06:11.428 because of some of the cryptography involved 00:06:11.428 --> 00:06:13.658 that some of these claims are accurate, 00:06:13.658 --> 00:06:15.915 that Alice, let's say, has the bitcoins 00:06:15.915 --> 00:06:17.836 that she's claimed to possess, 00:06:17.836 --> 00:06:19.129 and that she's expressed an interest 00:06:19.129 --> 00:06:21.309 to assign those bitcoins to him, 00:06:21.309 --> 00:06:23.205 but what he won't know yet is whether 00:06:23.205 --> 00:06:26.131 Alice has really tried to transfer those same bitcoins 00:06:26.131 --> 00:06:28.740 to anyone else over the course of time 00:06:28.740 --> 00:06:31.431 or maybe just prior to that point. 00:06:31.431 --> 00:06:33.146 the way that we handle that situation, 00:06:33.146 --> 00:06:34.445 and by the way, I should point out 00:06:34.445 --> 00:06:37.436 that this concept of Alice trying to, let's say, 00:06:37.436 --> 00:06:39.142 spend coins twice, 00:06:39.142 --> 00:06:41.304 in the context of digital cash 00:06:41.304 --> 00:06:42.956 and electronic currency systems, 00:06:42.956 --> 00:06:45.856 this concept is known as double spending, 00:06:45.856 --> 00:06:47.598 and it's something you have to worry about 00:06:47.598 --> 00:06:49.354 when you have virtual currencies 00:06:49.354 --> 00:06:51.706 because it's very easy for someone to just copy 00:06:51.706 --> 00:06:53.547 the numbers that represent this transaction 00:06:53.547 --> 00:06:56.547 and try to use them elsewhere. 00:06:57.331 --> 00:06:58.731 The way we basically handle 00:06:58.731 --> 00:07:00.946 and reduce the risk of double spending 00:07:00.946 --> 00:07:03.236 is through a specific set of nodes 00:07:03.236 --> 00:07:05.042 in this peer-to-peer network 00:07:05.042 --> 00:07:08.727 who are known as bitcoin miners. 00:07:08.727 --> 00:07:10.568 You might have heard this term bitcoin miners, 00:07:10.568 --> 00:07:12.514 and the bitcoin miners are basically 00:07:12.514 --> 00:07:14.770 specific individuals, 00:07:14.770 --> 00:07:17.123 specific nodes within this peer-to-peer network, 00:07:17.123 --> 00:07:19.132 and what they basically do is they take 00:07:19.132 --> 00:07:21.052 all of the transactions that they see, 00:07:21.052 --> 00:07:21.870 and remember, 00:07:21.870 --> 00:07:23.146 they're listening to all of these transactions, 00:07:23.146 --> 00:07:24.585 and not just Alice and Bob's, 00:07:24.585 --> 00:07:26.366 but other transactions that are taking place, 00:07:26.366 --> 00:07:27.980 and they'll take those transactions, 00:07:27.980 --> 00:07:29.752 and ultimately, they will take those transactions 00:07:29.752 --> 00:07:31.136 and will compile them 00:07:31.136 --> 00:07:34.375 into what's known as a transaction block. 00:07:34.375 --> 00:07:35.486 So it's basically a recording 00:07:35.486 --> 00:07:39.865 of all the previously unrecorded transactions. 00:07:40.402 --> 00:07:42.592 If you think of a single transaction 00:07:42.592 --> 00:07:44.082 let's say, as a ledger item, 00:07:44.082 --> 00:07:45.749 you could think of a transaction block 00:07:45.749 --> 00:07:47.904 as representing, let's say, an entire page 00:07:47.904 --> 00:07:49.613 in a ledger book. 00:07:50.289 --> 00:07:53.655 These bitcoin miners will also include in this block, 00:07:54.070 --> 00:07:55.804 in addition to all these unrecorded transactions, 00:07:55.804 --> 00:07:57.734 they will also include in this block 00:07:57.734 --> 00:08:01.287 a special transaction that's meant just for themselves 00:08:01.287 --> 00:08:04.004 to basically reward themselves for the effort 00:08:04.004 --> 00:08:06.481 of doing this mining. 00:08:06.958 --> 00:08:09.132 Now, a transaction block will also contain 00:08:09.132 --> 00:08:11.905 an encoding of the previous transaction block, 00:08:11.905 --> 00:08:14.153 so there's going to be some level of continuity, 00:08:14.153 --> 00:08:16.640 and then bitcoin miners will also include 00:08:16.640 --> 00:08:19.060 a specially-crafted sequence of numbers 00:08:19.060 --> 00:08:21.525 associated with these transactions, 00:08:21.525 --> 00:08:23.579 and this sequence of numbers is known 00:08:23.579 --> 00:08:26.599 as a proof of work, 00:08:26.599 --> 00:08:27.556 and it's called a proof of work 00:08:27.556 --> 00:08:30.053 because it's sometihng that's really hard to generate, 00:08:30.053 --> 00:08:31.844 something that requires a lot of effort to do, 00:08:31.844 --> 00:08:34.085 and that kind of makes it hard for just anybody 00:08:34.085 --> 00:08:36.796 to get involved with bitcoin mining willy-nilly, 00:08:36.796 --> 00:08:39.599 but it requires that they really exhibit or exert 00:08:39.599 --> 00:08:41.649 some computational effort, 00:08:42.141 --> 00:08:45.085 basically in exchange for getting this extra reward 00:08:45.085 --> 00:08:45.974 of a payment, 00:08:45.974 --> 00:08:47.753 and also in exchange for getting 00:08:47.753 --> 00:08:50.282 this transaction fee that they're going to be promised 00:08:50.282 --> 00:08:53.685 by Alice to engage in this sort of work. 00:08:54.053 --> 00:08:55.671 I'll talk about what proof-of-work protocols are 00:08:55.671 --> 00:08:57.851 in a separate video in more detail. 00:08:57.851 --> 00:08:59.548 Now, because each transaction block 00:08:59.548 --> 00:09:03.675 contains information about previous transactions, 00:09:03.675 --> 00:09:04.893 really what you end up having 00:09:04.893 --> 00:09:06.656 is not just a single block. 00:09:06.656 --> 00:09:09.169 You ultimately have what you can think of as a chain 00:09:09.645 --> 00:09:11.295 of transactions, 00:09:11.295 --> 00:09:15.109 and you can call this a transaction block chain. 00:09:15.109 --> 00:09:17.146 The idea is as soon as a bitcoin miner 00:09:17.146 --> 00:09:19.785 is able to construct a transaction block chain 00:09:19.785 --> 00:09:21.955 containing all these unrecorded transactions, 00:09:21.955 --> 00:09:22.999 and this proof of work, 00:09:22.999 --> 00:09:26.893 it'll broadcast the details of that chain out 00:09:26.893 --> 00:09:29.592 to all of the nodes, all of the peers 00:09:29.592 --> 00:09:32.996 on that peer-to-peer network for bitcoin. 00:09:33.379 --> 00:09:36.643 And then once the newly-broadcast chain 00:09:36.643 --> 00:09:39.055 gets kind of verified and meets the right properties, 00:09:39.055 --> 00:09:40.835 the nodes on the network 00:09:40.835 --> 00:09:42.299 are just going to go ahead and start using it, 00:09:42.299 --> 00:09:43.244 and they're going to start appending 00:09:43.244 --> 00:09:46.496 new transaction blocks to that chain. 00:09:46.496 --> 00:09:47.381 They're going to take anything 00:09:47.381 --> 00:09:48.471 that hasn't yet been processed 00:09:48.471 --> 00:09:51.278 and start incorporating it into the transaction chain 00:09:51.278 --> 00:09:54.213 that was broadcast out by the node 00:09:54.213 --> 00:09:57.528 who came up with the proof of work correctly. 00:09:57.528 --> 00:09:58.807 Now, this transaction block chain, 00:09:58.807 --> 00:10:01.249 really what we're going to be doing 00:10:01.249 --> 00:10:02.250 in the context of bitcoin 00:10:02.250 --> 00:10:05.266 is the nodes are only going to consider 00:10:05.727 --> 00:10:08.024 the transaction block chain that reflects 00:10:08.024 --> 00:10:10.881 the greatest amount of work to generate its contents, 00:10:10.881 --> 00:10:12.769 and again, there's this proof of work that I mentioned 00:10:12.769 --> 00:10:14.928 that is used to kind of determine 00:10:14.928 --> 00:10:17.713 or identify what the, what work was involved 00:10:17.713 --> 00:10:20.831 in coming up with the transaction block chain. 00:10:20.831 --> 00:10:22.929 The one that's the longest is going to be considered 00:10:22.929 --> 00:10:24.746 sacrosanct within the bitcoin system. 00:10:24.746 --> 00:10:26.970 Future miners are supposed to only work 00:10:26.970 --> 00:10:30.904 off the chain that has the most work put into it. 00:10:30.904 --> 00:10:32.331 Now, what's remarkable here 00:10:32.331 --> 00:10:34.876 is that the whole process is decentralized. 00:10:34.876 --> 00:10:38.190 There is no bank or no centrally-trusted entity 00:10:38.190 --> 00:10:40.851 that was actually involved in the transaction. 00:10:40.851 --> 00:10:42.809 Hopefully this first video gave you 00:10:42.809 --> 00:10:44.772 a bit of description, a flavor, if you will, 00:10:44.772 --> 00:10:47.746 for the high-level mechanics of the bitcoin system. 00:10:47.746 --> 00:10:50.450 There are a lot of stones I have left unturned, 00:10:50.450 --> 00:10:52.184 and what I'll do in subsequent videos 00:10:52.184 --> 00:10:54.138 is start covering those details, 00:10:54.138 --> 00:10:55.628 and I'm sure you have a lot of questions, 00:10:55.628 --> 00:10:57.416 and hopefully the future videos 00:10:57.416 --> 00:11:00.113 will help answer some of those questions for you.