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

Bitcoin: Overview

An introduction to the mechanics of bitcoins and an overview of how transactions take place. Created by Zulfikar Ramzan.

Want to join the conversation?

  • leaf green style avatar for user Matt
    What are some general advantages to using Bitcoins in a transaction vs. using Dollars, Euros, Pesos, etc.-- i.e., what is the point of their existence? As if the concept of paper money isn't hard enough to comprehend; now, digital money.
    (27 votes)
    Default Khan Academy avatar avatar for user
  • mr pants teal style avatar for user Anson Cheung
    i don't get the 'change' part. What does it mean?
    (16 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user Zulfikar Ramzan
      The way bitcoin transactions are defined, whatever amount is unaccounted for is treated as a transaction fee. So, if Alice previously received 50 bitcoins in a given transaction, and wants to assign 30 of these bitcoins to Bob, then she has to explicitly state what happens with the other 20 bitcoins (otherwise they will all be used as a transaction fee). This mechanism is how bitcoin handles "divisibility" of electronic currency -- and by divisibility, all I mean is that you might need a way to take a single amount and break it up into smaller amounts. (And for electronic currencies, divisibility is not always an easy property to achieve.) Maybe a good physical analogy is that you go to a restaurant and the bill is $30 and all you have is a single $50 bill. If you simply hand the $50 bill to the waiter and say nothing, then they may think you're being really generous and providing a $20 tip. So, instead, you might tell them that you want $18 in change back and that the tip is $2. Bitcoin transactions behave in this same manner.
      (41 votes)
  • leaf green style avatar for user silvercoin
    If it proves to be just another tool for illegal activities of tax evaders, money launderers, terrorist founders, etc, could the government ban such transactions? Why do I need more secrecy for buying groceries, houses, cars, paying school fees, clothing, rents, holidays? Who needs more secrecy?
    (0 votes)
    Default Khan Academy avatar avatar for user
  • starky ultimate style avatar for user Vincent Menniti
    If the internet was ever "disabled" or down for any reason, would this mean total loss of access to all of your funds?
    (4 votes)
    Default Khan Academy avatar avatar for user
    • primosaur seedling style avatar for user Liam
      In theory yes. Although once it comes back up again you'll still have access to it.

      The blockchain that keeps a record of who owns what bitcoins is saved onto every single bitcoin miner's computer, so thousands of people spread across the globe. The chances of all their computers blowing up is almost zero.

      There are also thousands more who have downloaded the client (and have become a node in the network). This basically means they've downloaded a copy of the blockchain.
      (6 votes)
  • blobby green style avatar for user andrewvecsey
    How can I buy BTC without a bank account?
    (4 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user dhsalisbury
    The main idea behind Bitcoins I don't understand is the accountability factor. If Alice were to pay Bob 14 Bitcoins as agreed, but Bob never produced the product or service, there would be no centralized authority to hold Bob accountable to this transaction.
    I'm sure I'm missing something here. Thank you!
    (5 votes)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user Mike Tsao
      Solving crimes, making up for loss or destruction, and making moral or value judgments aren't within the scope of Bitcoin. Same as cash: a dollar bill doesn't automatically fling itself back into the hands of the good guy. Bitcoin makes it easy to transfer value. That's it.

      You're saying there's "no centralized authority." But there is: the courts. Depending on which country you live in, if Person A and Person B to exchange Thing C for Thing D, and Person B fails to deliver Thing D after receiving Thing C, then that's probably a breach of contract, and Person A can sue Person B. It doesn't really matter whether Thing C is cash, services, a truck, bitcoin, or an orange.

      One neat thing about Bitcoin is that it supports escrow services if two parties want to use it. Check out http://nashx.com/HowItWorks for an example how to do it.
      (4 votes)
  • male robot johnny style avatar for user Shivek Khurana
    at , why does Alice wants some number of bitcoins to be returned back to her(or change that she will get back), when she can simply specify the exact amount of Bitcoins to be transferred ?
    (5 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user Quinn Harris
      The bitcoin system requires that all of an output is spent by a transaction input. Because of this, most likely the output(s) used will not be the exact amount you need to transfer so a change addresses is used for the remainder. Requiring outputs must be fully spent simplifies the design of bitcoin without reducing functionality.
      (3 votes)
  • aqualine seed style avatar for user paperbark
    Can I borrow bitcoins from the bitcoin system?
    If so what, if any, interest does the bitcoin system charge for my loan?
    (4 votes)
    Default Khan Academy avatar avatar for user
  • duskpin ultimate style avatar for user tuannb1997
    Can Bitcoins, practically, be used as a lubricant of multinational trade ? American consumers importing Chinese goods pay with U.S dollar, and then Chinese manufacturers of those goods convert the dollar into Yuan. Now suppose both countries use Bitcoins, I think it would be easier for people of both countries to use Bitcoins, as manufactures would surely cover all their production costs without any concerns about the exchange rate.
    (3 votes)
    Default Khan Academy avatar avatar for user
    • starky seed style avatar for user adrian.reyes
      There is an actual bitcoin limit. This is around 21 million. Every time you mine bitcoin with hardware, you usually get about 25 bitcoins. Roughly every four years this gets cut in half. So around 2100, there will be no more bitcoin mining. And 1.00 bitcoin costs around $250 dollars. That is not a tinny exchange.
      (2 votes)
  • old spice man blue style avatar for user Galba
    How do you mine bitcoin?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • starky seed style avatar for user adrian.reyes
      There are various ways to mine a 'bitcoin'. The two main ones are these: 1) Bitcoin mining. Bitcoin mining uses hard ware specifically for this purpose. This uses much electricity to power it, and you can loose profit since the volatility of the bitcoin is so high. This process takes time, but can earn you around 25 whole bitcoins. 2) Browser-Based bitcoin mining. This is is web based, where you look at ads and websites to earn bitcoin .This is less time consuming, usually, but earns only a few hundredths or thousandths of a bitcoin. (0.001)

      Hope this helped!
      (1 vote)

Video transcript

Voiceover: 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 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 of the underlying aspects that I have 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 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", and that may be a term that you've heard if you've 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 of the relevant details, and to me the best way to really wrap your head around a scheme like bitcoin is to really suspend belief for a bit and get exposed to all of these relevant details. Now, 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 and your questions will have been appropriately answered, but it might take some time to get there, 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 add in 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. With that, let me go ahead and just dive right in. 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 generating or transacting bitcoins, and, in fact, what happens in the content of a bitcoin is 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. 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. 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 really entries in some type of a global ledger, and by that, I mean let's say you have a transaction taking place, and 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 parties involved, and imagine that Alice wants to transfer, or really wants to assign, a certain number of bitcoins that she possesses over to Bob, and you can think of this transaction, really, as an entry in a ledger of some sort, and I also want to point out before proceeding that even though I've used terms like Alice and Bob, what I really mean in the context of bitcoin is not the actual identities in the physical sense, but really that Alice and Bob are identities in the bitcoin system, and these identities are just, in actual implementation, are just collections of numbers that do not have to be tied with Alice and Bob's real-world identities. In that capacity, you can think of bitcoin at any, it really is effectively being, of being pseudonyms, rather than real names, and the idea is that bitcoin really becomes more of a pseudonymous protocol, where people are addressed by their pseudonyms, and that provides some level of privacy to users that want to transact using the bitcoin system. Now, in a transaction between Alice and Bob, what Alice will basically do is specify a few different numbers. She has to specify how many bitcoins she wants to allocate to Bob. 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, 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 then the remaining 2 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. Now, Alice will take these transaction details and apply what's known as a digital signature to these transaction details, and a 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 bitcoin system, and this binding is really done in a cryptographically strong way. 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. Now, Bob, when he receives information about this transaction, he receives it over the peer-to-peer network. He'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 so on and so forth. 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 maybe just prior to that point. the way that we handle that situation, and by the way, I should point out that this concept of Alice trying to, let's say, spend coins twice, in the context of digital cash and electronic currency systems, this concept is known 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. 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. You might have heard this term bitcoin miners, and the bitcoin miners are basically specific individuals, specific nodes within this peer-to-peer network, and what they basically do is they take all of the transactions that they see, and remember, they're listening to all of these transactions, and not just Alice and Bob's, but other transactions that are taking place, and they'll take those transactions, and ultimately, they will take those transactions and will compile them into what's known as a transaction block. So it's basically a recording of all the previously unrecorded transactions. 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. These bitcoin miners will also include in this block, in addition to all these unrecorded transactions, they 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. Now, a transaction block will also contain an encoding of the previous transaction block, 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, and this sequence of numbers is known as a proof of work, and it's called a proof of work because it's sometihng 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 getting 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. 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 transactions, 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 this a transaction block chain. The idea is 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 of the peers on that peer-to-peer network for bitcoin. And then once the newly-broadcast chain gets kind of verified and meets the right properties, the nodes on the network are just going to go ahead and start using it, and they're going to start appending new transaction blocks to that chain. 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. 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's 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 the transaction block chain. The one that's the longest is going to be considered sacrosanct within the bitcoin system. Future miners are supposed to only work off the chain that has the most work put into it. Now, what's remarkable here is that the whole process is decentralized. There is no bank or no centrally-trusted entity that was actually involved in the transaction. Hopefully this first video gave you a bit of description, a 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 future videos will help answer some of those questions for you.