2.6 Sending and Receiving Bitcoin - Video Tutorials & Practice Problems
Video duration:
6m
Play a video:
In this lesson, we're gonna take the concepts of how Bitcoin works and understanding Bitcoin and we're gonna move into a practical approach by exploring sending and receiving Bitcoin. By this point, we've talked about the fact that you send and receive Bitcoin directly over the internet without needing the services of a third party but you need to understand what's really going on. In this specific lesson, we're gonna focus on an example of sending and receiving Bitcoin. For that, I'm actually gonna bring up Alice and Ben. Now, Alice and Ben are two parties that are gonna be sending Bitcoins over the internet. For this example that we're using, Alice will be sending five Bitcoins to Ben. Now, the key things I wanna point out as we go through this is that at this moment, Alice and Ben are just simple, random parties that wanna use Bitcoin, and you need to understand what Alice would need to be able to send Bitcoins, or what Ben would need to receive those Bitcoins and my objective is to explain it to you. It's actually quite simple. First thing we need to know is that Alice, in order to send five Bitcoins needs to have five Bitcoins to send and I know it's simplistic, but in the grand scheme of things, if you're gonna send Bitcoins, you need to have some Bitcoins. Now, you can buy Bitcoins, or you can receive Bitcoins, or you can earn Bitcoins, but ultimately, it's very similar to if you're gonna give $ to someone else, well, you need to have $5. So in order for Alice to be able to send five Bitcoins to Ben, she needs to have those five Bitcoins. Now, in order for Alice to really have those five Bitcoins, she needs to have a Bitcoin wallet, and this is the first step I wanna point out. In order for anybody to participate in Bitcoin, you need to have what's known as a Bitcoin wallet. Bitcoin wallet is a type of software that will let you keep your bitcoins, store them, send them, receive them, so the Bitcoin wallet is the first thing that's needed and Alice needs to have one of those. So as we go through this lesson, let's just give her a Bitcoin wallet. Right now, Alice has a Bitcoin wallet. There are many different types of Bitcoin wallets and they all serve the same purpose. They basically store and send and receive your Bitcoins, they manage those. To be really exact, a Bitcoin wallet, what it really does is it manages your keys. Bitcoin is a cryptocurrency and as a cryptocurrency, it uses cryptography. Now, the way that you're able to transfer Bitcoins is by using public and private keys, is what's known as public key cryptography. So, whenever you're sending Bitcoins, you're actually using public key cryptography and what it uses is a public key and a private key. Your public key you can share with everybody else. In fact, a Bitcoin address is nothing more than a hashed version of a public key. So, whenever you share your Bitcoin address with anybody else, it's perfectly okay because it's a public key, that means you can share it with everybody. However, the Bitcoin wallet will actually have the private key associated with that public key. So in this specific case, Alice's wallet actually has 20 Bitcoins and those 20 Bitcoins are protected over the fact that Alice has the private keys that will enable her to be able to send those Bitcoins to someone else. Now, for Ben to be able to receive those Bitcoins, he needs to also have a Bitcoin wallet because otherwise he would not be able to receive any Bitcoins. So for the example right now, we will actually give Ben his own Bitcoin wallet, and in that Bitcoin wallet, he will have 10 Bitcoins. Now notice, Ben's Bitcoin wallet also has a set of private keys because he actually has 10 Bitcoins and he can create public keys which will enable him to share Bitcoin addresses, but you need to have the private key to be able to spend those Bitcoins. So, in this specific moment, Ben's wallet contains 10 Bitcoins. For him to receive those Bitcoins from Alice, he needs to share a Bitcoin address. So Ben's wallet will generate a Bitcoin address. The Bitcoin address, as I mentioned, is a hashed version of a public key. So Ben can share that Bitcoin address with everybody that he wants. As a matter of fact, this example, what you're seeing is a real Bitcoin address. That Bitcoin address could receive bitcoins, I don't encourage you to send any of those because I won't be returning them to you but this is just for a demo. The idea is that that is a true Bitcoin address and I don't have any risk whatsoever sharing that with you because the Bitcoin address is a public piece of information which you can share with everybody because it's how you receive Bitcoins. So for this example, Ben is sharing his Bitcoin address with Alice. Alice will then use her bitcoin wallet to create a transaction that will send five Bitcoins to that Bitcoin address. What's really happening is, Alice's Bitcoin wallet will generate a new transaction using that Bitcoin address that Ben gave her and that transaction will state that there are five Bitcoins transmitted to that Bitcoin address. That specific transaction will be sent to the Bitcoin Network, which will then be an unconfirmed transaction making its way through the network. We'll be talking more about this in subsequent lessons in this course, but the key point is, at this moment, a transaction has been generated from Alice's Bitcoin wallet, which sends five Bitcoins to Ben's Bitcoin address, and that transaction has been sent to the Bitcoin network to eventually be added onto a block and added to the Bitcoin blockchain. Once that transaction is confirmed, that is, it is added to the Bitcoin blockchain, we will have a transaction that shows that five Bitcoins have been added to Ben's Bitcoin address. Now, Ben's Bitcoin wallet will reflect that he has 15 Bitcoins. Note, it's not that he literally has 15 Bitcoins, his wallet has an addition of all the transactions that have been sent to that wallet, which total an amount of 15 Bitcoins. So you see, he had 10 Bitcoins and those 10 Bitcoins could have been, I received one bitcoin at one time, I received three Bitcoins at another one, so when you compile it all together, Ben's Bitcoin wallet will reflect that he currently has 15 Bitcoins worth of value in that wallet and he'll be able to send from those 15 Bitcoins to other people, because he owns the private keys to that wallet. Now, in the case of Alice, Alice's wallet will reflect that there was a transaction sent out from her wallet for five Bitcoins, and it will now reflect the lower balance so it kept... Before it had 20 Bitcoins, now it shows that there's only 15 Bitcoins worth of value in her wallet and Alice is at liberty to send from those 15 Bitcoins to anybody else around the world, because she controls the private keys to those 15 Bitcoins. And in a nutshell, that's exactly what is happening when Alice sends five Bitcoins to Ben. In subsequent lessons, I will show you exactly what's happening in the Bitcoin network, behind the scenes to make this happen.