If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content
Current time:0:00Total duration:11:02

Video transcript

bitcoin is a new virtual currency system that's been gathering a lot of attention recently and I thought I would do a series of videos where I where I really dive into the innards of Bitcoin and explain how it works in detail and my plan for this first video in this series is to describe some of those mechanics at a high level and then what I'll do in subsequent videos is dive a bit deeper into all the underlying aspects that I touched upon within this first video and my hope is that by the end of this video series you'll know not only what a bitcoin is but you'll also understand the mechanics of how of how transactions are initiated you'll see how verification occurs for those transactions and you'll also learn what it means for someone to really engage in a process known as Bitcoin mining that may be a term that you've heard if you have had any interest in Bitcoin recently I do want to point out also that the Bitcoin scheme is fairly involved it requires some time to really cover all the relevant details and to me the best way to really wrap your head around the scheme like Bitcoin is to to really suspend belief for a bit and get exposed to all these relevant details now you'll undoubtedly you'll have a lot of questions along the way but my hope is that by the end of this video series all of the relevant stones will have been overturned then your questions will have been appropriately answered but it might take some time to get there okay and in part that's because I'll try to describe things in a way that's sensible and that might involve leaving some details out until I can explain enough pieces of the scheme and then adding those details in as I go along so that you're not inundated with too many minor points and nuances along the way but you get a feel for the overall system as I go through things so with that let me go ahead and just dive right in and first of all I do want to point out that Bitcoin has been described really as a decentralized currency because there's no real central bank or entity that's involved in in generating or transacting bitcoins and in fact what happens in the context of it of a Bitcoin is that all the transactions really require what's known as a peer-to-peer network a network of just individual hosts that essentially collectively agree on different aspects of how the protocol is implemented and used okay and then bitcoin itself is also referred to sometimes as a cryptocurrency and by a cryptocurrency I mean that we use a lot of cryptographic techniques in order to facilitate or to really enable Bitcoin transactions to take place and I'll do separate videos on some of these techniques but just take it at face value right now that it's decentralized and is a type of cryptocurrency and I also want to point out that the term Bitcoin itself can in fact be a bit confusing and in many ways Bitcoin transactions don't really resemble traditional coin transactions so much as they represent a really entries in some type of a global ledger and by that I mean that let's say you have a transaction taking place in let's say the transaction is taking place within or among two parties and we'll call them Alice and Bob which are traditional names that are used in many cryptographic protocols to describe the the parties involved and imagine that Alice wants to transfer / really wants to assign a certain number of bitcoins that she possesses over to Bob ok and you can think of this transaction really as an entry in a ledger of some sort okay and I also want to point out before proceeding that even though I I've used terms like Alice and Bob what I really mean in the context of Bitcoin is is not the actual identities in their physical sense but really that Alice and Bob are our identities in the Bitcoin system and these identities are just in actual implementation or just collections of numbers that do not have to be tied with Alice and Bob's real-world identities so in that capacity you can think of Bitcoin identity really is effectively being of being pseudonyms okay rather than real names and the idea is that Bitcoin then becomes more of a pseudonymous protocol where people are addressed by their pseudonyms and that provides some level of privacy to users who want to transact using the Bitcoin system okay now in a transaction between Alice and Bob what else will basically do is specify a few different numbers just to specify how many bitcoins she wants to allocate to Bob so let's say Alice started off with 50 bitcoins of her own she might decide that she wants to give let's say 30 of these bitcoins over to Bob okay and let's say she wants to have some number of bitcoins returned back to her so you have to specify or Alice has to specify rather how much change she's going to get so in this case let's say her change is going to be 18 bitcoins for herself and the remaining two bitcoins are going to be a transaction fee and we'll talk about what a transaction fee means a little later and I think I'll also dive into it in future videos but it's basically an incentive for other nodes in the Bitcoin network to help Alice in essentially validating some of the details of this transaction for Bob okay now Alice will take these transaction details and apply what's known as a digital signature to these transaction details and the digital signature is basically the mathematical analog of a traditional signature it really binds Alice's identity to the details of this transaction and by Alice's identity again I mean her identity within the the Bitcoin system and this binding is really done in a cryptographically strong way okay now the details of this transaction once it takes place are going to be broadcast out so alice is going to take these transaction details and effectively just broadcast them out to all the nodes in the peer-to-peer network that represent Bitcoin nodes okay now Bob when he receives information about this transaction he receives it over the peer-to-peer network um you'll probably sandy check some part of the transaction for example he might check that the numbers work out correctly that Alice let's say started off with 50 bitcoins and is not trying to transfer more than 50 bitcoins to him and and so on and so forth and he's going to have some mathematical assurance because of some of the cryptography involved that some of these claims are accurate that Alice let's say has the bitcoins that she's claimed to possess and that she's expressed an interest to assign those bitcoins to him but what he won't know yet is whether alice has really tried to transfer those same bitcoins to anyone else over the course of time or or maybe just prior to that point and the way that we handle that situation and by the way I should point out that this concept of owl is trying to let's say spend coins twice in the context of digital cash and electronic currency systems this concept is known as as double spending and it's something you have to worry about when you have virtual currencies because it's very easy for someone to just copy the numbers that represent this transaction and try to use them elsewhere okay and the way we basically handle and reduce the risk of double spending is through a specific set of nodes in this peer-to-peer network who are known as Bitcoin miners okay so you might have heard this term Bitcoin miners and the Bitcoin miners are basically specific individuals so specific nodes within this peer-to-peer network and what they basically do is they take all the transactions that they CNN remember they're listening to all these transactions not just Alice and Bob's but other transactions that are taking place and you'll take those transactions and ultimately they will take those transactions and compile them into what's known is a transaction block okay so it's basically a recording of all the the previously unrecorded transactions okay so if you think of a single transaction let's say as a ledger item you could think of a transaction block as representing let's say an entire page in a ledger book okay and these Bitcoin miners will also include in this block in addition to all these unrecorded transactions it will also include in this block a special transaction that's meant just for themselves to basically reward themselves for the effort of doing this mining okay now transaction block will also contain an encoding of the previous transaction block okay so there's going to be some level of continuity and then Bitcoin miners will also include a specially crafted sequence of numbers associated with these transactions in this sequence of numbers is known as a proof-of-work okay it's called a proof-of-work because it's something that's really hard to generate something that requires a lot of effort to do and that kind of makes it hard for just anybody to get involved with Bitcoin mining willy-nilly but it requires that they really exhibit or exert some computational effort basically in exchange for forgetting this this extra reward of a payment and also in exchange for getting this transaction fee that they're going to be promised by Alice to engage in this sort of work okay and I'll talk about what proof of work protocols are in a separate video in more detail now because each transaction block contains information about previous transaction really what you end up having is not just a single block you ultimately have what you can think of as a chain of transactions and you can call us a transaction block chain okay and the idea is that as soon as a Bitcoin miner is able to construct a transaction block chain containing all these unrecorded transactions and this proof of work it'll broadcast the details of that chain out to all of the nodes all the peers on that peer-to-peer network for Bitcoin okay and then once the newly broadcast chain gets kind of verified and needs to write properties the nodes on the network are just going to go ahead and start using it and they're gonna start appending new transaction blocks to that chain okay they're going to take anything that hasn't yet been processed and start incorporating it into the transaction chain that was broadcast out by the node who came up with the proof of work correctly okay now this transaction block chain really what we're going to be doing in the context of Bitcoin is the nodes are only going to consider the transaction block chain that reflects the greatest amount of work to generate its contents and again there is this proof of work that I mentioned that is used to kind of determine or identify what the what work was involved in coming up with this transaction block chain okay and the one that's the longest is going to be considered sacrosanct within the Bitcoin system and future miners are supposed to only work off of the chain that is the most work put into it now what's remarkable here is that this whole process is decentralized there was no bank or no centrally trusted entity that was actually involved in the transaction hopefully this first video gave you a bit of a description of flavor if you will for the high level mechanics of the Bitcoin system there are a lot of stones I have left unturned and what I'll do in subsequent videos is start covering those details and I'm sure you have a lot of questions and hopefully the the future videos will help answer some of those questions for you