 As you know, he is one of the go-to minds in this space, considered an expert by both the industry and the mainstream media. He's one of the most well-known educators in Bitcoin and the author of the four books, including Mastery of Bitcoin, which is considered one of the best technical books available on the market. He's a fellow of the University of Nicosia, where he's taught eight sessions of the free Bitcoin course, massively open online courses. He's the co-host of Let's Talk Bitcoin, the longest-running English-speaking podcast in the Bitcoin space. He's testified before the Canadian and Australian Senates on the impacts of regulating Bitcoin. He's a strategist, a visionary, a highly sought-after public speaker, and a board member of the C4 organization that brought us all here today. He invented the Bitcoin diet, which involves discovering Bitcoin, studying it for 18 hours a day, forgetting to eat, losing 26 pounds, and then recovering. It's not a diet that he recommends, but an innovator nonetheless. And he's inspired many in the space. This industry has been changed significantly because of the impact that he's made. And he will inspire many of us. He's inspired many people who are already here to quit their day jobs and pursue full-time work in the Bitcoin industry. So consider yourself warned and help me welcome Andrea Santinopoulos. That was a lovely introduction. Thank you so much, Anne. All right, welcome everyone. I'm going to switch away from the podium mic so I can move around a bit. And I'm also gonna try and move around up here in front if that's okay with the cameras. They'll let me know if that's okay. And, oh yeah, it is. Fantastic. So welcome. We're gonna be doing the certified Bitcoin professional prep course. Now, this is not everything you need to cover for your exam for the CVP. Specifically, there will be additional sessions in this conference, including DERC session on cryptographic basics that you'll see later today. And others where you can supplement your education as well as a study guide on the Crypto Consortium website. This will give you about 80% of what we need to cover. I welcome questions throughout the session. Just raise your hand if you have a question. I'm gonna repeat it and then we'll continue with the presentation. We're not gonna do Q&A at the end. We're just gonna mix it in because I'd like to explain things as we go and make sure we've covered everything comfortably. Is everybody ready to learn, apply, grow? Or just learn? So let me switch to this mic, see if it works. Can you hear me still? Fantastic. Can the cameras see me here? Fantastic. All right, this is what we're gonna be covering today. We're gonna be covering the history of Bitcoin, keys addresses, units issuance, blockchain explorers, and all of the rest of the things you see on this slide. We've got an hour and a half, so there's plenty of time for questions as we go through. Now, the first and most important warning is do not send crypto to the addresses in this presentation, right? We have burned the private keys on purpose. Despite the presence of this warning, people have now sent more than two Bitcoin to addresses in my book that are lost forever. Or, if you like, gifted to the rest of the economy through deflation. All right. So you probably know the mythology and history of Bitcoin and where this amazing technology and invention came from. It all started in October of 2008, when Satoshi Nakamoto published a white paper on a cypherpunk mailing list. We now know that when Satoshi published this paper, they had already been working on the software. Satoshi wrote the paper after writing the software once they were convinced that the software would work. But the paper was published first. So an interesting little historical tidbit there. You may notice that when I talk about Satoshi Nakamoto, I refer to Satoshi as they. This is not necessarily a plural noun, they. It's a indetermined pronoun. So they, because Satoshi could be male. Satoshi could be female. Satoshi could be non-binary. Satoshi could be alien. Satoshi could be a group of people. Satoshi could be the name of a committee or project. We don't know. It does not matter at all. In January, the software was released, and on January 3rd, the first block, the Genesis Block, was mined. Interesting fact also, the Genesis Block was not mined with the client. It was mined using some other software manually, effectively mined by a custom script, and is included in every piece of software that uses Bitcoin. There is a copy of the Genesis Block and its fingerprint. That is what Bitcoin is. Bitcoin is a blockchain that originates from that Genesis Block. Seven days later, Hal Finney, a world-renowned cryptographer who unfortunately passed two years ago, joins the network and starts mining. At this point, there are two miners on the network. So in terms of decentralization, the Bitcoin network is much more decentralized today. When people say, oh, it's too centralized, there's only a few miners. Well, at first it was one. That was centralized, then there was two. That was a bit less centralized. And actually, if you look at it historically, we're getting more decentralized over time. Almost 10 months later, in October 2009, the first fiat exchange that has been recorded was made on a exchange where one dollar bought 1,000 Bitcoin, presumably from a miner. And then almost five months later, or six months later, pizza day, Laszlo Hyniek went out and said, I would like to make a commercial transaction to establish a baseline value for Bitcoin in a commercial realm. And Laszlo Hyniek arranged for someone to buy pizza with Bitcoin. Now, this did not mean that he got Domino's Pizza to accept Bitcoin. No, this is a much, much simpler transaction. He persuaded someone to use their credit cards to call Domino Pizza and deliver two pizzas to Laszlo's house. And in return, Laszlo sent 10,000 Bitcoin. 10,000 Bitcoin for two pizzas, which now makes this the most expensive pizzas ever purchased in the history of humanity. Laszlo has some regrets. But without commercial activity like that, we wouldn't have the network we have today. In December of 2010, just about two years after first appearing on the scene, Satoshi Nakamoto posts the last message and vanishes. Satoshi Nakamoto has not appeared again since. Several other people have appeared claiming to be Satoshi Nakamoto and failing to provide the most basic and simple evidence of that, which is to sign a message using one of the keys in the first few blocks. What the signing a message using one of the keys in the first few blocks prove? Does it prove that someone is Satoshi Nakamoto? No. It proves that someone has the keys that Satoshi Nakamoto used to mine, which they may have acquired using different means. What it proves is they might be Satoshi Nakamoto. But if they don't sign a message with one of the keys in the Genesis book, what does that prove? It proves they aren't Satoshi Nakamoto because Occam's razor. The simple answer is probably correct. Now, the word Bitcoin means many different things, and therefore some of the confusion that arises in the space comes from vocabulary. Bitcoin is a network. Bitcoin is a blockchain. Bitcoin is a currency. Bitcoin is a system. Bitcoin is an invention. Bitcoin is a white paper. Bitcoin isn't a company. Bitcoin isn't a trademark. Bitcoin isn't an organization. Bitcoin is a disorganization. A very powerful disorganization. If you see it with a capital B, usually, or sometimes, that means the network, the system itself, a decentralized peer-to-peer network that creates consensus without needing a central authority. That is, Bitcoin, the system, proper noun, capital B, right? Bitcoin with a lowercase b is a currency. So the money is called Bitcoin with a lowercase b. It's not Bitcoin's, right? Because Bitcoin applies for both singular and plural purposes. I have lots of Bitcoin, or I have no Bitcoin. I have one Bitcoin. I have three Bitcoin. Nowhere do I say Bitcoin's. If you spell Bitcoin with a space, B-I-T space, C-O-I-N, welcome to this space. Please don't write an article for your newspaper yet. It's too obvious that you just joined. Blockchain. Blockchain is one component of the technology infrastructure of Bitcoin, the system. One component, not the most important component, not the most revolutionary component. In fact, that technology pre-existed. In fact, most of the technologies used in Bitcoin pre-existed. Hashes, hash trees, cryptography, public key cryptography, digital signatures, proof of work. All of these things existed before Bitcoin. The invention is to take all of these things together and leverage proof of work as a mechanism for consensus that allows us to control a blockchain in a decentralized manner when no one has ultimate control over it. Can you build a consensus algorithm different than proof of work? Yes. Can you build a blockchain that is not decentralized and doesn't use proof of work? Yes. Blockchain is not the most interesting technology in Bitcoin, and this is often misunderstood. Blockchain is like the transmission in your car. Very important, absolutely necessary to keep moving, but no one said, oh, finally, with the invention of the internal combustion engine in the automobile, we now have the ability to build transmission-based vehicles. Nobody said, I like cars, but I'm more interested in the technology behind cars, transmissions. In the blockchain space, a lot of people make the statement, well, Bitcoin's interesting, but, but means I haven't understood it yet. Bitcoin's interesting, but, I'm more interested in the technology behind Bitcoin, blockchains. These new fangled automobiles are interesting, but, I'm more interested in the revolutionary technology behind automobiles, pneumatic inflatable tires. If we could combine pneumatic inflatable tires with the steady traditional propulsion mechanism of horses, we could really do something interesting. We're gonna go for the rest of this course based on some fundamental user stories. This is a technique I use in my books too, in order to help move the narrative forward so we can understand. Ultimately, this technology is about people, right? Money is a social structure, and these blockchain systems, these networks, are social structures that technology enables, and therefore, people are important. In this particular case, we're going to use three people, Alice, Bob, and Catalina. Alice lives in Europe. She's new to Bitcoin. In this course, we'll see her buy her first Bitcoin, and we'll talk about how that works, and use it then to buy a book from a United States publisher called Bob. Bob lives in the US, runs an online bookstore, and has a lot of customers outside the US who make payments in different currencies, including Bitcoin. Catalina is an Argentinian web developer with clients all around the world, and one of her clients is Bob. And now we'll follow their stories through this book. We're going to use these stories to illustrate three different transactions, how those transactions work, what they're made of, and gradually explore the various technologies behind Bitcoin using these transactions as a reference. First of all, Alice uses cash to buy Bitcoin from a Bitcoin ATM. Then Alice uses Bitcoin to buy a book from Bob's web store, and what a great choice of book. Bob then uses Bitcoin to pay Catalina's invoice for web design. So let's start with Alice buys Bitcoin from a Bitcoin ATM. How many here have used the Bitcoin ATM ever? Okay, wow, quite a few. Very good. So how do you get your first Bitcoin? And that's the question that comes up a lot, especially with newbies, right? And the common answer most people will say is, oh, go and sign up for an account on this exchange, and they mention an exchange, and use your bank account or your credit card to buy Bitcoin. That is an acceptable answer. It's not a good answer. So let's look at some good answers. First and foremost, earn. Get paid in Bitcoin. Most people don't even think about this one, right? What are the benefits of using your labor, the products you make, the services you offer, the skills you have to earn crypto? This doesn't just apply to Bitcoin, of course, but any form of money. The huge benefit of earning crypto instead of buying it is privacy. If you go and offer someone a haircut or drive a taxi or wash a car or paint a painting or set up a web server and you get paid in Bitcoin, are they going to ask you for your driver's license, passport, birth certificate, grandma's maiden name, social security number, passport number, proof that you're not Iranian? No, you're gonna get the job done, you're gonna get paid in crypto. So you just earned your first crypto and it's private. It's a private commercial transaction between two individuals, privacy matters. Secondly, what is the exchange fee you pay when you earn Bitcoin? Zero, that is the best exchange fee to pay. Zero, nobody's gonna charge you a fee. In fact, in many countries, you might actually get a premium for that. You don't always have to be self-employed to do that. Many companies offer an opportunity to get paid directly in crypto, either as your whole salary or as part of your salary. I currently employ 11 people, some as employees, some as contractors, several of them get paid partially or wholly in crypto. Some Bitcoin, some Ether, some a mix of the two, bit of US dollars in the mix, maybe some Euro, just mix it all up and pay your people. So you can earn in a variety of ways, including as part of your wages. There's also companies that can help you do that, even if your employer has no idea what this Bitcoin thing is that you keep talking about. So what they can do is they can become a payroll provider where, just like you take some of your payroll out and put it towards a savings account or a retirement account, and your employer is quite happy to deposit to a different bank account. Well, some of these providers will take that and convert it instantly to Bitcoin and send it to you. So your employer doesn't even know that you're getting paid in crypto, you're just having it converted each time. That does carry an exchange fee though, and all of the identity requirements. Of course, you can buy crypto from an exchange, and that's one way of doing it. You can buy Bitcoin from a Bitcoin ATM using cash. In Europe and many countries around the world, Bitcoin ATMs are completely anonymous. You don't need to provide any ID to buy or sell Bitcoin. Some of them are two-way. You can send Bitcoin in and it spits cash out. Very useful if you're a tourist in the foreign country. Much better way to get cash in the local currency than using an exchange. In the US, 99% of Bitcoin ATMs will require you to identify yourself by providing some kind of identification document, and they will charge you quite a bit. This is because of state-based regulations on money transmission. You can also buy directly using cash from just people. And you can do that using an intermediary service like local Bitcoins. And what they will do is they will make sure that the Bitcoin is an escrow so that neither party can run away with the money and not pay the other party. Now, obviously, meeting someone at the Starbucks to exchange some amount of cash in order to exchange it for magic internet money may be risky, right? You wanna do this in a public space exactly the same way you would if you were buying or selling something on Craigslist or eBay and you had to meet the other person in person, right? Don't go to an alley. You know where one of the best places to trade crypto is? A police station or a bank. They don't care. In fact, some police stations around the country have Craigslist zones where you can go right under the cameras and do your transaction next to the police station so everybody feels safe. Well, you can use one of those. And finally, you can trade your belongings for Bitcoin. Sell your car for Bitcoin. Has anybody done that? Yes, I have. I sold a Mini Cooper at 11 p.m. on a Saturday night when all of the banks were closed to a person who wasn't in the state at the time in a completely different state paying for his cousin to buy the car. Three confirmations, here are the keys. That was enough for me. Sell your house for Bitcoin. All right. So what Alice is going to do is she's going to use one of these techniques to get Bitcoin and the preferred technique she's going to use is a Bitcoin ATM. Now, a reminder, Alice is in Europe, right? So she's going to use Euro. And she's going to put 80 Euro in cash, let's say four 20 Euro bills and feed them into this little machine over there. You see it has a little slot that's for feeding in the cash. And then she's going to receive from the Bitcoin ATM 0.026845 Bitcoin. When I did these slides, that was the exchange rate. We'll talk about that in just a second. Everybody clear so far? Okay, quick note, because I noticed some of you are trying to take notes or take pictures of the slides. The slides are available at bit.ly-slash-all-over-case-a-m-a-c-b-p-prep-a-m-a-c-b-p-prep. They're publicly viewable. You can go to that link, download them, the Google slides. And by the way, CC by SA, Creative Commons, Attribution, Share, Like, as long as you link back to the originals, you can do whatever you want with these. You can publish them, you can sell them, you can create webinars, you can do whatever you want. Everybody clear on that? Everybody got that? bit.ly-slash-a-m-a-c-b-p-prep. All right, so this is the Bitcoin vending machine. On the left-hand side, you see four pictures of 20 euro bills, which I'm pretty sure is illegal in lots of countries to take photos of money and put them on the slide. But there you go. And those are not real money, but Alice is using real money and she feeds that real money into the ATM and the ATM spits out Bitcoin. How does it spit out Bitcoin? On the right-hand side, you see that little transparent partition? In there is an LED light and a camera. And that is the mechanism that this ATM uses to read a QR code off of Alice's smartphone. So it's a passive device. The way it sends Bitcoin is by reading Alice's destination address through that camera. So Alice shows the ATM a Bitcoin address, which we'll talk about in a bit. And that way, the ATM will complete the transaction by sending that Bitcoin to that Bitcoin address. So how much Bitcoin is 80 euros? How do we know how much Bitcoin is 80 euros? How does anybody know what the value of Bitcoin is? How many dollars is 80 euros today? Anybody know? How would you find out? You look at an exchange rate. Okay, Google, what is 80 euros in Bitcoin? Those equals 0.01 Bitcoins. So we can find out quite easily. That's not magic technology. How does Google know an exchange? How does it know a market place? So Bitcoin doesn't really have a price. People talk about the price of Bitcoin or the value of Bitcoin. But the thing is commodities have prices. A banana has a price. A Bitcoin doesn't have a price. It has an exchange rate because it is money. Money doesn't have a price. Money has an exchange rate. You don't say how much does a euro cost. What is the exchange rate between a euro and a dollar? Here's one site that can help us find out that information. BitcoinAverage.com. There's many sites like this. You could go to a specific exchange and ask that exchange what the current price is. Here you can see Kraken, Bitstamp, GDAX, which is Coinbase, BitfinX. And they're all advertising a price or exchange rate for Bitcoin. Do you notice something about this? Are the prices or exchange rates different? Which one's correct? All of them. Very good. There is no one price. The price is something that is determined in real time on different markets based on the activities of buyers and sellers of cryptocurrency who are trading it in real time. So what does BitcoinAverage.com do? It's right there in the name. It takes all of those numbers and it calculates a rolling weighted average. Weighted by what? Volume weighted. What does volume weighted mean? Well, if somebody trades one Bitcoin on Coinbase for a certain price and somebody else trades 100 Bitcoin on Bitstamp for another price, which price matters more? The 100 Bitcoin, right? The volume matters. You shouldn't be able to change the average of an entire market with a small volume. So volume weighted means that each one of the averages is multiplied by the volume of transactions or trades that is happening on each exchange to arrive at a global average of price. Lots of different sites do this. BitcoinMarketCap, CoinCap.io, BitcoinAverage, and of course the exchanges have a pretty good view of what's happening in your area or country in that market. There may be significant discrepancies between regions. In some countries, people will find that Bitcoin is more expensive. I have this question come up often. People will say to me, why is Bitcoin 20% more expensive in India? Bitcoin is not 20% more expensive in India. Rupees are discounted 20% in India. The reason you can't buy Bitcoin for the same price as in the United States is because once you buy it with rupees, the person who sold you that Bitcoin cannot export those rupees from India and you can export the Bitcoin, which means that their money is less portable and your money is more portable. And when you trade less portable money for more portable money, the person who gets the less portable money demands a premium. Right? Does that make sense? Right. How do you know that's true? Really simple. You go to India and you say, how much is a Bitcoin? And they give you a price in rupees. And then you say, oh no, no, no. How much is this in dollars? I have cash. And then they give you the exact same price as it is on Coinbase in the US. If you have dollars in India, the price you'll get for Bitcoin is the dollar price, which proves that it's actually rupees that are 20% discounted, not Bitcoin that's 20% higher. Is this making sense to everybody? And you can do that experiment with different values or systems. You could buy Bitcoin with gold in India. And trust me, they'd give you a really good price for that. So this is how price discovery happens. Have you all heard the expression price discovery? Not so many. Okay, why do we use the term price discovery? Price discovery is used as a term in economics because of the assumption that everything that has some kind of value, right, has a price or exchange rate, which is not set by markets, but it is discovered by markets. So markets are a mechanism for finding out what the real value of something is. How much is a banana worth to you, right? If you create a market for bananas, the market will discover on average how much a banana is worth in whatever thing you're trading it for. So we talk about price discovery because in economics, the idea is that the market doesn't tell you what the price is because the market is setting the price. The market is trying to figure out to discover what the actual value of this thing is. And the way markets do that is by looking at market movements. Has anybody seen this chart before? This is called an order book chart. Now what this chart shows here is right at the middle is the price at which the most recent trade happens right there. I don't have a laser pointer, so I'm gonna use my shadow puppet system. At $3,745 a trade happens here where some of the people who are selling and some of the people who are buying in green met each other and were happy to do a trade. The line you see going up to the right in red is all of the orders of people who are trying to sell Bitcoin and the price they want to sell that Bitcoin at. So somewhere here, you see that little spike? At about $3,780, someone is willing to sell 30 Bitcoin. So someone has put an order on this exchange and they're like, I will sell you 30 Bitcoin for $3,780. Who's gonna buy that? Well, now, yes, in retrospect. On that day, in that market, right, nobody was willing to buy that. How do you know? Because here's where the buy orders are. Someone else is going, well, at $3,710, I'm willing to buy. Who's gonna sell me? No one, right? So there's a difference of opinion. This difference of opinion is called the spread, right? It's the spread between what is known as the bid price and the ask price. If I'm selling Bitcoin, I'm asking. So my order is called an ask order. And if you're buying Bitcoin, you're bidding to buy Bitcoin and your order is called the bid. This is how stock markets work. This is how bond markets work. This is how commodities markets work. If you wanna buy pork belly, you say I'm willing to buy 10 tons of pork belly at $30 and somebody else says, I would sell it to you, but I want $32. As the market moves around, people change their orders and change their prices until they meet a buyer. So the current price of any commodity in an open market is the average of the prices that people actually agreed and traded on over the past period of time. So if lots of orders got fulfilled at a specific price, that's what's gonna show up, up there. So this is the mid-market price for the last trading period. They might do that average over a matter of minutes, seconds, or whatever, depending on volume. Everybody clear? Any questions so far? All right, so now we know how everybody knows the exchange rate at this moment. The ATM is internet connected. In order to fulfill Alice's trade, the ATM is going to go on the internet and use some price provider. It might be a site like bitcoinaverage.com that takes the price from lots of exchanges and averages it, or it might be a specific exchange price for the country in which the ATM is operated, which would make sense because that exchange most likely represents the local market's price discovery vis-à-vis the local market's currency. Whatever it is, 80 euros at one bitcoin being 3,000 euros means that Alice receives 0.0 blah, blah, blah, blah. Yeah? So how does Alice receive the bitcoin? We talked about this earlier. There's a little camera in there that's looking to take a photo of a bitcoin address. Now, at this point, if you're new to this space, all of this is very, very confusing because there's a lot of terminology you've probably heard. You've heard the term he, and you've heard the term address. And then you've probably heard some adjectives like private, public, and those are usually combined with those two other words, private key, public key, public address, bitcoin address, public bitcoin address, what are these things, right? Public key cryptography is the basis for all of these things, but it's very, very confusing at first. It's a rather esoteric area of math. So what we're going to do is use an analogy, okay? Think of a series of lockers that are in a public space, maybe this is a bus station or a train station or the main square in your city. And lining the walls are all of these lock boxes. And these lock boxes are pin-coded, right? So there's a little pin code keypad on the front. The other thing that's unique about these lock boxes is they all have a little slot at the top. And that slot means that you can drop something into the lock box, yeah? Okay, so if you drop something into the lock box, who can open it? Whoever has the pin, yeah? Okay, how many lock boxes can one person own? All of them, right? How many people can access a single lock box? Millions, you could have millions of people who have the same pin number for the same lock box and they can all open it. You could have a company representing thousands of customers that has one lock box and a pin number and holds that lock box on behalf of its thousands of customers. So if I say there are a million lock boxes in Bitcoin that have money in them, how many people are using Bitcoin? We have no idea. When you next read that article that says, Bitcoin ownership is concentrated among X number of addresses, shock, horror, and dismay. What is the meaning of that statistic? It's bullshit. No, no, better. It's bullshit with a clickbait headline that tugs at your heartstrings in order to make you feel dismay over this unequal distribution of income. Addresses are not people. People are not addresses. Lock boxes can be owned by millions or a single person could own millions of lock boxes. So again, we've got these boxes, they're in a station. This image is not perfect because it misses something really interesting that happens at Bitcoin. All of the lock boxes are transparent. You can actually see inside whether there's money in there and you can count it from the outside of the box. You can't touch it, you can't open it, but you can see it's there, right? And that's the fundamental technology of Bitcoin. There's one more tiny little detail. You see that label, that white label in the top right corner of the box? All of the boxes are numbered. Well, actually no, sorry, it's this label, two. That's lock box number two. So in a blockchain system, that would be the address. So the address is a publicly identifiable number. Simply enough, that's what an address is, a number that tells you which lock box you need to use. When Alice is exchanging currency euros for cryptocurrency, Bitcoin, what she's telling the ATM by showing a QR code is my lock box is number three. The ATM then puts Bitcoin through the public slot into that lock box, and now Alice, being the only one who has the PIN code to that lock box, can access that Bitcoin. There are really only two components that we care about. The address, which identifies which lock box people should put money in that you control, and the PIN number that controls the lock box, that allows you to spend from it. The PIN number is the private key, and the lock box number is a Bitcoin address. Any questions so far? Now, if you saw these lock boxes in a public train station, and they were transparent, and there was money inside them, you're probably thinking, I need to get me one of those PINs. So the first question that comes to mind is, can I figure out the PIN number from the number on the front of the lock box? Not if we want the system to be secure. So, a Bitcoin address tells you nothing about the private key. It's a very important consideration. Can you ever find the private key from the Bitcoin address? No, you can't. They have a mathematical relationship, but that mathematical relationship is one way. The Bitcoin address is generated from the private key, not the other way around. You cannot go backwards. Almost everything in cryptography is based on this fundamental idea, which can be summarized as you cannot go backwards, also known as one-way functions in math. Any questions? Okay, how else would you figure out a PIN? Brute force, excellent. And what that means is you go up to the PIN code and you go, let's see if they're really stupid. One, two, three, four, five. Okay, that didn't work. Beep, beep. Zero, zero, zero, zero, zero. No, that didn't work either. Now, how long are the PIN numbers in Bitcoin? 256 PINs. And for those of you who are not computer scientists, what does that mean in decibel? 77-digit PINs. 77-digit PINs. So you could try 99999999999999999999999977 times. At the end of it, you've got a callus on your finger, your hand is sore, and you didn't get the PIN. And now you have to try again. How long would it take you to try all possible combinations with a 77-digit number? Our brains are not good at doing this. Because these numbers have no physical equivalent unless you start talking about cosmology. 10 to the power of 77, or a number with 77 digits, is the same number as the number of atoms, atoms in the entire visible universe. Every star you see, every piece of matter on Earth, in our sun, in our solar system, in the galaxy, in all the galaxies in the entire universe, and you count the tiniest bit of matter, which is an atom, and you can fit that in a 77-digit number. So how long would it take? Forever. All right, so practically speaking, we talked about a Bitcoin address being a number, and that number identifies Alice's lockbox in the giant set of lockboxes out there. Now what did I say at the beginning of this presentation? Don't send money to this. This is a real Bitcoin address. You can scan that QR code. Please don't send money to it. This is a form of a Bitcoin address. It starts with a three. We'll talk about that a bit later. And it follows a series of letters. Now I said previously that a Bitcoin address is a number, and now you see this and it looks like gibberish text. Why? The reason is that it is a number that is not convenient to encode in decimal. So how big would this number be if I wrote it out in decimal, meaning zero to nine digits, zero, one, two, three, four, five, six, seven, eight, nine. Using just those digits, how long would this number be? 77 characters long. Instead, it's 36 characters long. Why? Because if you also use letters, you can write things in a more compact way. And this system of letters and numbers is called base 58. It's called base 58 because it is a 58-sedecimal system. That's not a real word. It means it's a system where each digit in the number is represented by one of 58 characters, not 10, so it's not decimal. It's not hexadecimal, as you may have heard of hexadecimal. Hexadecimal uses 16 characters to represent numbers, not 10 as in decimal, right? And base 58 uses 58 characters. Why 58? 26 lowercase, plus 26 lowercase would be 52, plus 10 numeric digits would be 62. There's four missing. The reason there's four missing is because certain characters will actually cause problems. For example, a lowercase l and an uppercase o are often mistaken for zero and one, respectively. So in using a 58-base system and removing those characters that may be ambiguously or easily confused, it makes it easier for humans to read this and transcribe it accurately. You never need to read it and type it out. I've been in Bitcoin since 2012. I can count maybe two or three times that I've had to type out a Bitcoin address on a keyboard very, very carefully because we use QR codes to do the same thing. A QR code is simply a barcode, and if you scan that barcode, what does it contain? This. Just this. Sometimes it has a little prefix, Bitcoin, colon, and then that just to help the system identify what it is. Any questions so far? Does everybody hate computer scientists for inventing base 58 and not explaining it in high school? Okay, very good. It's a bit confusing, but trust me, this is a number. It's just written with different digits and zero through nine so that it's more compact. So, Alice shows the code to the ATM. The ATM photographs the QR code, extracts the data within the QR codes, which you can do with any QR code reader, doesn't have to be Bitcoin specific, and in return receives a Bitcoin address which is in the QR code. If you use your camera on your phone, not a Bitcoin wallet, just your camera, just the camera app. On Android, it's called Lens, and it reads barcodes. I think on iPhone, it's just automatically you just tap on the barcode, and then, oh, get shadow out of the way, then you go and you scan this. Very good. And I have Bitcoin, colon, three, seven, blah, blah, blah, blah, blah. It's just a barcode. There's nothing magical about this. This is what I'm trying to demonstrate. There is nothing magical about the barcode. The barcode is just a way of writing that Bitcoin address in a way that a computer can read it very, very easily. One of the nice things about barcode technology is that there's more information in those dots than is needed to encode that so that even if some of them are missing or smudged or the ink has faded, the cameras can actually still read the underlying information. They can reconstruct it from the rest of the dots, which is useful, right? Because otherwise it doesn't scan. All right, so the Bitcoin ATM then sends Alice Bitcoin. What do we mean when we say sends Alice Bitcoin? Well, it doesn't send, and it doesn't send to Alice, and it doesn't send Bitcoin. So that sentence is completely wrong. As we'll see now, we use that as people to communicate the action that makes sense to us. The ATM sent Alice some Bitcoin. Only the ATM didn't send it because Bitcoin doesn't move. Bitcoin is always on the Bitcoin network. It's not in my pocket. It's not in my phone. It's not on the wallet. It's on the blockchain always. And what the Bitcoin ATM is sending is not to Alice. It's sending to three seven LRVHJJDHDEERGQ. LRVHJJDHDEERGQ. Does the Bitcoin ATM know that that belongs to Alice? Does it have to belong to Alice? I want you to think carefully about this right now. Let's say I wanted to buy a T-shirt, and there's a store that accepts Bitcoin. I go on the store with my phone. I say buy this T-shirt, put it in the cart, check out, pay with Bitcoin, great. What does the store show me? A Bitcoin address, right? All right. So I walk up to an ATM, I show the Bitcoin address, I put cash in, and I just paid for the T-shirt. I'm not even sending the Bitcoin to me. Does the Bitcoin ATM know any difference? Right? My cousin in Bogota needs some cash to buy a motorbike. They text me their Bitcoin address. I put it in a QR code, I go to the ATM, I show the Bitcoin address, I put cash in, I send money to my cousin in Bogota. Does the Bitcoin ATM know any different? The address doesn't have to belong to that person. Yeah? An artist is playing on stage. On their guitar, they have a QR code. I'm in the audience. I take a photo of the QR code on the guitar. I walk outside of the concert, go to a Bitcoin ATM, show the photo to the Bitcoin ATM, put money in, I just contributed to that artist. So think about this a bit. The Bitcoin ATM is not sending money to Alice. The Bitcoin ATM is constructing a transaction to pay the Bitcoin address that Alice showed, which may or may not belong to Alice. And there's a mountain there. 0.026845 Bitcoin. Actually, that's not true. The Bitcoin ATM is actually sending 2,684,500 Satoshis, because Bitcoin doesn't exist. Nowhere on the Bitcoin network, on the Bitcoin blockchain, in the Bitcoin system, is there such a thing as a unit of a Bitcoin. Everything is Satoshis. What is a Satoshi? A Satoshi is the smallest unit, but it's also the only unit that actually exists. Everything in the system is measured in Satoshi. If I say the Bitcoin ATM sends 0.02 Bitcoin, that is technically incorrect. The Bitcoin ATM divided the amount by 100 million Satoshis to show you that it was 0.02 Bitcoin, but it actually sent 2 million Satoshis. The only unit that exists in the system is the Satoshi. Everything is stored as Satoshi. One Bitcoin is 100 million Satoshi. How many Bitcoin will be mined in the Bitcoin network ever? Anyone? None, because there are no Bitcoin. 21 quadrillion Satoshis is the upper limit that will never be reached. The Bitcoin network will mine less than 21 quadrillion Satoshis by the end of its operation. Make sense? Because we're mining Satoshis. We're sending Satoshis. We're receiving Satoshis. Now, humans do not think in eight decimal places. Many humans I know, especially those educated in the public schools of this and other countries, don't operate in two decimal places or even zero decimal places. So for the convenience of humans who don't like trying to do division, we use other units. Now, this is a concordance table and you can read it from the left and say one Bitcoin is 100 million Satoshi. Yes? Go down to the bottom. One Satoshi is one Satoshi. One Satoshi is 0.0000001 Bitcoin. Understand how to read this? So there's a couple of other units that you may have heard of. Milibit is from the prefix milli, which means one thousandth and is part of the international metric system used by every civilized country in the world, X, or never mind. And a bit is one millionth of a Bitcoin or 100 Satoshi. So if you think of a Satoshi as a penny, a bit is a dollar, right? Does that make sense? 1.75 bits is 175 Satoshi. And you can do these conversions relatively easily. You just move decimal points around. Now, for many people, it's very difficult to think in long decimal places. So even when I said Alice receives 0.02685 Bitcoin for her 80 euros, you get confused as you're reading that as to how big or small that is related to a Bitcoin. If you think of it instead in terms of two million Satoshi, it's much easier to think of that, right? It's two one hundredths of a Bitcoin. Story number two, Alice buys a book from Bob's store. Now Alice is gonna do another transaction where she's going to send 0.01123458 Bitcoin to buy a book from Bob's web store and Bob is going to ship a book to Alice. There's gonna be some exam questions at the end. Pay attention here. I'm just kidding. Now, there is a laptop and with that laptop, Alice is looking at Bob's web store. And on the store, Bob has a book available for 40 US dollars. And that book then has its price translated to 0.01123458 Bitcoin. How does Bob translate the price? Do you remember from our previous conversation? Anyone? An average Bitcoin average or some other exchange or a marketplace has the price discovery. Now, interesting question here. Why is Bob pricing the book in dollars and not Bitcoin? Is it because he's a dirty fiat, no coin there? There's two reasons and this is important. The first reason is that for the vast majority of people out there, if you say, hey, this is about a million, 1.1 million Satoshi, is that good for you? You're like, is that a lot? Is it a little? What is it now? You know how the joke goes where the kid says, dad, I want a 10th of a Bitcoin for my allowance. And the dad goes, what? You want $1,200 for your allowance? I can't give you $1,100. That's ridiculous. No kid your age gets $800. Volatility. Bitcoin is not a good unit of account. And the reason it's not a good unit of account yet is because the market is small and as a result it's still volatile. And it's volatile enough that it makes it impossible to price things. When we started this conference and planned this conference, Bitcoin was $3,600. I had people complain and say, why aren't you pricing your tickets in Bitcoin? It's like because you would have paid three times the cost if you bought the ticket now instead of six months ago. That doesn't seem logical, right? And you'd probably, and if you wanted to refund what are I supposed to do? Give it to you at the current price? At the previous price? In dollars? Or in Bitcoin? It's a problem, right? We don't use Bitcoin as a unit of account. So one reason is volatility, difficulty for consumers understanding the price because Bitcoin is not good at pricing yet. The other reason which is equally important is Bob is running a business in a particular jurisdiction, in this case the United States. Bob has to do accounting. Bob has to pay taxes. How does Bob pay taxes if he doesn't know the price of the things he's buying and selling? Guess what? The rest does not accept Bitcoin, right? Yet, thank you. They accept dollars. The very meaning of the phrase legal tender is that it is accepted for payment of debt to the government. Bitcoin is not legal tender. Now if I'm Bob and I'm trying to do accounting, it's a lot easier for me to say I sold the book at $40. $40 today, $40 tomorrow, $40 next week. I'm getting different Bitcoin amounts, but that doesn't matter because the value of the Bitcoin at the time that I sold the book was $40. That makes my accounting very easy. I do all of my accounting in US dollars, I have to. And I say this not just in terms of Bob, I run a business where I do Bitcoin payments and Bitcoin receivables and I have to price everything in US dollars, not because I'm a dirty, fiat no-coiner, but because I have to pay my taxes and report my income to the US government, right? So that's why the price is in dollars, even though the payment is accepted in Bitcoin and converted in real time at the moment of payment. As you can see here, Alice, who has a rather large hand, is scanning, it's the only clip art I could find, is scanning the QR code in order to make a payment, right? Often it's a lot easier to use a mobile wallet on your smartphone, even if you're making a payment to a website that's on your laptop. Why? Because I can't scan the QR code on the laptop screen with the laptop camera that's on the laptop screen. Now, if you think I haven't held up a handheld mirror and tried to align, I have, it worked, it was a pain, but it worked. But critically here, one of the things that new users have a problem with is this concept of, hang on, the Bitcoin address is on my laptop. If I pay for it with my smartphone, will my smartphone know how to send the money to the website? Because they think that what a wallet is doing is sending the money to the other device, the website, the other smartphone, the wallet. It's not. It's constructing a transaction that is depositing money into a public address. Bob's Store doesn't care how money arrives at that address. Bob's Store is watching that address and waiting for a payment to come in. When that payment comes in, it knows that somehow Alice made that payment. Why? Because it actually produced an address for Alice's cart. So in a store situation like that, the store generates a unique address for every customer's purchase, for every cart. When money comes into any of the addresses that the store is watching, it can see which cart that corresponds to, mark that cart as paid, and then tell Bob to ship. That's how web stores work in the cryptocurrency space. So does it matter how Alice got money into that address? Does she have to use the same device? No, she could pick up her laptop, go up to an ATM, hold the screen like this, and put money in. This is a difficult concept for people to recognize because it doesn't match what we do with credit cards. You can't go and enter the credit card on your smartphone to pay something you just bought on a website. So this is what it looks like from Alice's perspective. She scans the QR code, her wallet shows her that there's a payment of 0.01123458, which is 3973. Hang on, I thought it was $40. This was taken maybe a couple seconds later. Did the price change? Not necessarily. What's happened here is that Alice's wallet may be using a different provider for pricing than Bob's store, right? Does it matter? No, because the price that Bob has charged her is the price that Bob's store is accounting in Bitcoin, which means Bob is charging her 0.01123458, whatever Alice's wallet thinks that is, which in this case is actually 3973. Everybody understand why this is happening? By the time Alice sends this to Bob, the store may see a different US dollar price, but it doesn't matter. Bob has effectively committed to that exchange rate for a period of time during which he'll do the transaction in order to sell that book. Alice then constructs that transaction. Now, this is a different type of address that Bob's store uses. Do you see that? It starts with BC1QZ3A8. Has anyone seen an address like that? Does anyone know what that kind of address that is? Shout it out. Bech32, I got you, that was a trick question. Nobody knows how to pronounce Bech32, so I asked people to shout it out just so we can see what happens. Bech32, Bech32, Bech32 is the name of this kind of address. It is what is known more broadly as a native segwit address. We'll talk about that in some of the other courses that are gonna follow, but suffice it to say, that's just a Bitcoin address. You know that from the BC1Q that is the prefix to all of these addresses. This does not use a base 58 encoding, it actually uses a 32 character encoding with some very interesting properties for error correction. Doesn't matter. All you need to know, a lot easier to read because it's lowercase, no uppercase characters being used, and it's the new format that most Bitcoin wallets are moving to. And so Alice presses the send now button, done. Hang on a second, what's that fee thing? No one told me there would be fees. I was promised a free lunch. We'll talk about that in just a second. So we looked at a transaction previously. You remember, we looked at the transaction that the ATM constructed in order to give Alice her 0.02 Bitcoin, that is about 40 euro, oh sorry, 80 euro. And any transaction is composed of two parts, inputs and outputs. Inputs are what you're spending, outputs is what you're paying to. So if you look at the transaction from the ATM, the ATM consumes some inputs and created an output to Alice for 0.026845 Bitcoin. Alice now uses that input to construct an output to Bob for 0.01123458. All good so far? Great, but here's the problem. When you consume Bitcoin in an input of a transaction, it is spent in its entirety. Yes? Someone here says, give me $18, I pull out a 20. How do I give $18 out of a 20? I can't, it's indivisible. I can't take 10% of the bill, tear it off and give the other person 0.9 of a $20 bill and say here, this is about $18. No, it's now $0 because you tore the bill, you maniac. The same thing applies to Bitcoin. The input is an indivisible chunk of Bitcoin. When you spend it in a transaction, you spend all of it. Alice gives the entire input, but she needs change, right? So if someone says, pay me $18 and I have a 20, I expect them to give me $2 back. And the change is actually created by Alice's wallet. So Alice's wallet creates a transaction where the input is the chunk of money that the ATM gave her, indivisible, two million satoshis. And the outputs are one output to Bob to pay for the book in the precise amount and one output back to Alice's wallet, a different address analysis wallet called a change address. It's just another address with the rest. Think of it as Alice opens the lockbox, pulls out a two million satoshi chunk, right? And then has to spend all of it. So she puts $40 worth in Bob's lockbox and the rest of it in her own lockbox has changed in a single transaction. So far so good, everybody with me? All right, this is the actual transaction on the blockchain. All of these are real transactions. You can go look at them and I encourage you to do that as homework in order to understand these things better. I'm using a block explorer called blockstream.info and you can use this bit.ly link, which is case sensitive, meaning the A and the T are capital, otherwise you go to a page about a small city in Texas called Alice. Alice, Texas is the all Lord, don't go there. It's fine, I mean, you can, but capital A, capital T, if you type that in, it's actually gonna take you to this blockchain explorer page where you can see this transaction. One input, two outputs. So far so good. So what have we learned? Bitcoin history, keys and addresses, markets, exchanges, pricing, units of accounts, inputs, outputs and change, and using block explorers. Now let's talk about some of the more advanced topics in the time that's remaining. So we saw this transaction where Alice pays Bob for the book, that transaction had two outputs. Who among you did the math to try to add it up? Nobody, good. And if you try to add it up, if you add up 0.01123458 and 0.0155808, the answer is not 0.026845. It's less. There's a chunk of money missing. That chunk of money is 2,962 Satoshis that is missing from this transaction. It's not missing. It's a fee and it's paid to miners. So where in a transaction are the fees? Nowhere. The fees are the money left behind on the table to tip the miners. You pay at the restaurant, the waiter brings you change, you put some of it in your pocket, you change your dress and you leave some coins on the table and walk away. That's the tip. That's how Bitcoin transactions work. Alice spent her ATM input, spent some of it to Bob, put some of it back in her own wallet as change in her pocket and left some on the table, 2,962 Satoshis and that money will be collected by the miners as a fee for this transaction. What happens if you don't include a change address? Well, let's do the math. The input is 0.02684500. The outputs are 0.01123458. The fees are, ouch, a million five Satoshi, 1.5 million Satoshi, ouch. So in today's money, that's maybe about $150 fee on a $40 purchase. Alice is a big tipper, what can I say? Habits she picked up in Vegas, who knows? Why do we have transaction fees? The answer is really simple. Space for transactions is limited. It's limited by physics, it's limited by technology, but it's also artificially limited by software. We do not want blocks that are enormous because enormous blocks means costs for everybody processing blocks, which then gets externalized. In economics, there's no such thing as a free lunch. If you're not paying fees, someone's paying fees. You're either paying them in terms of inflation, you're paying them in terms of giving cartel advantage to a monopoly by centralizing access and control, or you could just pay fees. If we have to decide how transaction gets into block and which transaction should and which transactions shouldn't get into a block because we have limited space, there's really only two ways to do that. One is to specify in the software which are good transactions and which are bad transactions, what I euphemistically call a dictatorship of developers. Think about it. If developers gets to decide what is a valid transaction that should be prioritized versus which transaction is wasteful or spam or for an irrelevant application that they don't particularly need, we just created a dictatorship of developers. They decide which applications are now allowed on the network simply by controlling that function. There's only one way to correctly price the scarce resource of transaction space or block space in a way that doesn't give anyone control and that is a market. Fees operate as a market in order to give the freedom of the sender of each transaction to decide for themselves how important this transaction is and how much of a priority it has in their perspective. And in doing so, they have to compete against all of the other people who are trying to get their transaction into the block and that competition for block space is the market for fee price discovery. Now, when transactions are transmitted into the Bitcoin blockchain, they're not automatically included in the very, very first block because there's more transactions than fit in a block usually. So what they do is they go into a holding space and this holding space is called the mem pool. There is no single mem pool. Every system on the Bitcoin network has its own mem pool, a picture of what it thinks remains to be confirmed or entered into the blockchain. This is the queue. This is where all the transactions are lining up, waiting for their chance to enter the blockchain. And as they're sitting in this queue, they're advertising themselves to miners going, I have lots of fee, pick me, right? If you look at this with colors, the red color at the top actually corresponds to this transaction up here, one transaction that at this time was paying 2,000 Satoshi per byte. Why? Who knows? Because to the person who sent that transaction, that transaction was so urgent that they were willing to pay an enormous fee. Meanwhile, there's 8,333 transactions waiting with just over one Satoshi per byte. And those transactions are less important. Some are even not paying any transaction fee. Those don't get confirmed almost at all. It's actually difficult to do that nowadays. But with one Satoshi per byte, you will get your transaction confirmed most of the time eventually. I do payroll. In fact, I have to do payroll in three days. And some of my employees get paid in Bitcoin. I'm going to put a one Satoshi transaction fee on my payroll. Why? Because nobody cares if it arrives in eight hours instead of three hours instead of six minutes, right? None of my employees are gonna be, I need my payroll in 10 minutes. First block please, come on, chop chop, tick tock. I got shopping to do. Compared to the banking system, 12 hours to get your paycheck from the moment it's caught by a company, that's super fast, right? Now if I want to get into any block within the next 12 hours, I'm going to be a cheap ass about it. So I'm going to use the lowest fee. Now what do you think these things are, these gaps here? What do you think this is? That's a block. I have a nice little picture to explain that. There's a miner. The miner is making a block. How do they make a block? They look at the pool of everything waiting in the queue and go, I'll take these. And they take a big chunk off. This is a simplification of the algorithm. There's no big yellow digger involved. And this is not an endorsement of Volvo. But what the miner is effectively doing is skimming the most highly paying transactions off the top until there's no more space in the block they're trying to make and they filled it. Why? Because they're trying to maximize their profit. So they take a chunk out and you see that in the mempool, all of those transactions that drop out of the mempool, the reason they drop out is because they just got confirmed in the block. And now the rest of them are waiting. Now at some point during the day when you look at the mempool, you'll see that it gets all the way to the bottom and that means that all of the transactions that were outstanding, it just goes flat. Great, everybody got in. Sometimes some of those transactions just stay there for days. There's Alice's transaction on the Bitcoin blockchain. It was confirmed at height 560344, you can see that block on the blockchain. What does it mean it was confirmed? It means that the transaction was included in the block. So let's look at that in a bit more detail. Alice creates the transaction somewhere around here. At some point, a block is mined. When that block is mined, and that's block 560344, Alice's transaction is included in that block. Three minutes later, another block is mined. 20 minutes later, another block is mined. Blocks get mined on average every 10 minutes. On average is one of those tricky English phrases that doesn't mean what you think it means. On average, every 10 minutes does not mean every 10 minutes. Just like the average American family has two and a half children. Have you seen a half children? And which way would they cut it? Left to right, top to bottom. Who gets the bottom part? Definitely not a good plan. On average, every 10 minutes means that sometimes it takes 40. Sometimes it takes an hour. Sometimes it takes 30 seconds. Over weeks, it's almost precisely 10 minutes if you average it all out. Because the network is tuned to maintain that heartbeat. But sometimes you wait a long time for your block. Can I get a time check for the end of the session? 22 minutes left, very good. All right, so now let's look at it in terms of time. This was in terms of blocks, this is in terms of time. Alice creates signs and transmits a transaction paying Bob's address $40 or that amount in Bitcoin. Bob's wallet that's running on the web store is watching a lot of addresses. Maybe Bob has lots of customers with lots of carts and lots of addresses simultaneously buying products. Presumably you want Bob to be able to sell more than one product at a time. So Bob's wallet is watching all of these addresses. What does watching mean? It means the Bob's wallet is connected to the Bitcoin network and has told the Bitcoin software that he's running, please tell me if any payments happen to the following list of addresses, right? That's what the software is doing. Now, Bitcoin operates as a broadcast network, which means that when you send a transaction on the Bitcoin network, you shout it. It's called a flood or gossip protocol. So what you do when you're on the Bitcoin network, what Alice's wallet is doing is it's talking to all of the Bitcoin nodes that it has direct connections to and it's gossiping, it's flooding, it's shouting a transaction. It says, hey, I have a transaction. Blah, blah, blah, blah, blah, blah. The other nodes go, oh good, new transaction. Let's see if it's valid. Yep, that's valid. I'm gonna tell everybody I know about it. And they tell all of the nodes they're connected and each one of those nodes looks at the transaction and goes, huh, let's see if it's valid. Yep, I'm gonna tell everyone I know. So they tell everyone they know. And the transaction spreads really, really fast. Within 15 seconds, it spread to the entire Bitcoin network all around the globe. Within 15 seconds, anywhere in the world, Bob's wallet is going to see a notification that says, hey, one of your addresses receives the transaction. Or Bob, you've been paid with the AOL voice, which you probably remember if you're in your 40s like me. Now, at this point, the transaction is not confirmed. What does that mean? It's not in the blockchain. It's sitting in the queue. It's in the mem pool. It's in Bob's mem pool. It's in Alice's mem pool. It's in the mem pool of every single Bitcoin node on the Bitcoin network. And at this point, everybody's waiting to see the next block. This may take some time. Is Bob in a hurry to ship this book? Oh, this is the beauty with physical products. And it's gonna take days or weeks for that book to reach Alice. Bob can wait 10 minutes. So what Bob's wallet is doing is it's waiting until this transaction is confirmed in a block because it may never be confirmed. If it's not confirmed, Bob didn't get paid. Bob only got paid if the entire transaction is in the blockchain and the entire world knows that Bob got paid. Until that moment, Bob hasn't been paid. There's a transaction out there. Now, for a book, Bob can wait. But what if it's a Starbucks? What if you just bought a cup of coffee? Like, thank you, that will be a large latte? Oh, yeah, that's $12. Oh, okay, ouch. Here, let me send you a transaction. Thank you so much. It's confirming, wait. Please wait. This gentleman's transaction is confirming. Any second now, plus or minus 40 minutes. This doesn't work, right? But think about it this way. How often have you bought coffee from a Starbucks and not had to sign or enter your pin with a credit card? Well, if you haven't signed or entered your pin, can you reverse that transaction on your credit card? Absolutely you can. You can call the company and go, I didn't buy a coffee. I haven't signed or put my pin in. I want my money back. And they will give you your $12 back. And Starbucks will be out one coffee and down $12. They don't care. The reason they don't care is because in terms of risk, the number of people who would charge back that coffee versus the delay they would have to wait to make sure they actually got paid or had to wait for someone to sign or put a pin in, they can serve three other customers, and it doesn't matter. The same thing applies with blockchains. If I'm selling you a coffee, I don't care if it's confirmed. The chance is that there will be a blockchain reorganization that undoes that transaction or that it's never confirmed is less of a problem for me if I have three other customers to serve. Now, if you're buying a flat screen TV, I'm not gonna let you walk out of the store until it's confirmed at least once, maybe twice. Yeah, if you're buying a house, I don't care really. I'd like six confirmations, but I know where you live because you just bought the house. Like, I'm not gonna sign over the title right now. It's gonna take a few days, so it's okay. So all of this is probabilities. It's a risk-based probability. When people say six confirmations are the gold standard, what they mean is after six confirmations, the probability of that transaction being reversed is so low that I'm willing to accept that risk. And that probability is entirely dependent on the value of the transaction you're talking about. So whatever it is for you, I have like a rule of thumb. Zero confirmations for a cup of coffee. Zero confirmation for anything that I'm gonna ship in more than half an hour from the moment that you make the payment because I'll get some confirmations by then, right? One confirmation for some electronics, something nice that I'm gonna hand you right away. Maybe two confirmation for a flat-screen plasma. Three confirmation for a Mini Cooper. Actually did it, three confirmations. Good enough for me, here are the keys, walk away. I signed over the title after three confirmations. The chance of that being reversed, eh, not a problem. Yeah, also I know what your car is and the license plate, I'll find you. Four confirmations, five confirmations for a house. I would sell a house with five confirmations. I would sell a house with three, yeah. Six confirmations for a Ferrari that you drive off the lot with appropriate insurance, yes. Seven confirmations for a mansion. Eight confirmations for an aircraft carrier. 144 confirmations for $22 trillion of US debt, I'd take it, right? Bitcoin isn't worth enough to do that. So the mining actually happens separately from the receipt of the transaction. You may hear this term in economics or in markets, settlement or clearing. Settlement or clearing is the finalization of a transaction. It is the moment at which a transaction is no longer reversible. How long does it take to clear or settle a credit card transaction? Anyone? 60 days. How long does it take to approve a credit card transaction? 10 seconds or less. But don't think it's settled. If you're a merchant, they can show up 59 days later and go, uh-uh, never happened. Sorry, right? That's why merchants love crypto. No charge backs. There is no 60 days. So 10 minutes seems like a long time if you're thinking that retail transactions are instantaneous. They only are if it's cash. If it's a credit card, it's actually not instantaneous at all. The merchant doesn't get paid for at least 30 days. And in many cases, that payment is a credit that is subject to being taken back if the transaction is disputed. And the pinnacle of that is I've had a transaction reversed from a credit card 18 months after it was made. A credit card company came back and said, no, no, that never happened. Sorry, you owe us money. Good luck. See you in court. 18 months. The goal. So after 60 minutes approximately, Bob's wallet has received five confirmations. Six confirmations, sorry. Five more blocks mined on top of the one containing Alice's transaction. Let's go back and look at this. Block 56344 contains Alice's transaction. That means Alice's transaction has now been recorded in the block on the blockchain. How many confirmations is that? Anyone? All together now? Make a guess? Come on, one. One confirmation. So what does it mean to say a transaction has one confirmation? It means it's in a block. What does it mean to say it's zero confirmations? It means it's not in a block yet. It's in the mem pool. When it goes from the mem pool to a block that's actually been mined, it's in the blockchain now. It's in that block. That block is one confirmation, all right? So if block 56344 is one confirmation from Alice's transaction, what is block 56345? Two confirmations. Now this is where it gets a bit confusing. Alice has received two confirmations on hand transaction when one block has been mined on top of the block that contains her transaction. We count one for the one that has her transaction, one block for the one above her transaction on top of her transaction. That's layered on top. So we're building up, right? Two confirmations. Three confirmations with block 560346. Six confirmations at block 560349, which is five blocks after the one that Alice's transaction was in. Yes? The block it's in is one. And then we layer on top. What's the upper limit on how many confirmations the transaction can receive? Anyone? What is the maximum number of transactions you can have? There is no maximum. How many transaction confirmations approximately has how finnish transaction from 2009 received so far? 560,000 or more confirmations in every 10 minutes, one more. So if you look at a really old transaction, it's gonna say this transaction has 300,000 confirmations. All that means is that it was mined 300,000 plus one blocks ago. Yes? Now let's look at our final example of the day and we'll wrap things up and get done with this. Now, Catalina wants to get paid for web design. Catalina has a software development company in Argentina, now she operates in Argentinian pesos or ours, right, ARS, Argentinian pesos. I would love to tell you that that's the exchange rate. Things have not been good for Argentina since I wrote these slides. So she's charging 10,000 pesos and in that time 10,000 pesos was 262 US dollars. Her invoice is actually written out for 10,000 pesos because that's how she prices for services because she operates in the currency that is legal tender in Argentina, which is Argentinian pesos, right? Bob agrees to pay that. How does Bob figure out what the exchange rate is in Bitcoin? Bob converts pesos to dollars, dollars to Bitcoin. Why? Because Bob has to do accounting in dollars. So Bob has to put in his accounting system, I pay 262 dollars and then convert that into Bitcoin and pay 0.07811758 Bitcoin, which Catalina will account for as I receive 10,000 pesos. Is this making sense? Now you see this double exchange rate that happens when you're doing two national currencies but the payment is in Bitcoin. This is critical to understand how you do accounting. We have some other classes for that too. All right, here's the transaction to pay Catalina. This is a real transaction. This looks really weird. Can anybody guess what's happening here? Bob has these inputs to pay Catalina, why? Anyone? Multiple addresses in the wallet. What are these addresses? What are these inputs? Yeah, these are not change addresses. They're on spend transactions but why are there so many of them? What is Bob selling? Books, how much is Bob selling these books for? 40 bucks each. Catalina wants 262 dollars. Bob has a whole bunch of $40 chunks of Bitcoin that Bob has received as payment for each one of the books in his store. Each one of those payments from each one of those customers created an output that Bob's wallet controls but that output is unique and indivisible. So Bob's wallet has all of these $40 payments, right? Only they're not $40 payments. They're $39.73 payments. They're $39.82 payments. They're $41.72 payments because the Bitcoin price keeps changing. So while he's selling $40 books, each of the little payments that comes in is slightly different. Bob's wallet needs to take all of these unspent chunks of Bitcoin, which we call UTXO. We'll talk about that in a bit. And aggregate them together to make a payment to Catalina, right? Have you ever been in a convenience store where the person in front of you goes, how much is that bottle, please? $2. Okay, $0.10, $0.20, $0.30, $0.10. That's what Bob's wallet is doing, right? He has a bunch of loose change. Now, this loose change could be millions of dollars per payment, but each payment is unique and indivisible. Each output can only be spent in its entirety. There's two ways Bob could make this payment. They might have the exact amount in a UTXO and pay that to Catalina, done, easy. Unlikely to happen, doesn't consider fees, all kinds of complications. Most likely Bob has a slightly larger amount, pays that, gets change, pays the fees. So two outputs, one input. But in many cases, Bob's wallet actually doesn't have a big enough UTXO, so what it has to do is aggregate several inputs, pay the amount that Catalina needs, pay change back to himself, and guess what, fees. Fees are in there too. Do the math, you can figure out how much Bob paid in fees. This is what this transaction actually looks like on the blockchain. Again, it's a real transaction. I sat there for two days making $40 payments as the price of Bitcoin change to a store that doesn't exist in order to make this slide. You're welcome. And that's the real transaction. We're gonna wrap up by explaining the blockchain now that we have a much broader picture of all of these components. It starts with what's known as the Genesis block. We count that as block zero because we're programmers and we're annoying in that way. We count from zero. So block zero is the Genesis block. Block one is the next block in the sequence and it points back to block zero as its so-called parent. The parent block is the block that came before, the child block is the block that came after. Every block has a parent, right? Which is the block it was mined on top of as a child. And inside each block, there is a reference to the parent block. This creates an unbroken chain if you take the block that just got mined while I was talking and you look inside at its parent and you follow that back one block and then you look at its parent and you follow that back one block and you keep doing that. 580,000 blocks later, you're going to arrive at the Genesis block in an unbroken continuous chain all the way back to January 3rd, 2009. Each of these references is in the block header and the block also contains transactions. I'm gonna run a bit late, but not too much. Now, if you were to go and try and change one of these transactions here, what would happen is you'd be modifying the data in this block. If you modify the data in this block, the block hash changes, which means that the next block is now not pointing correctly, which means that you'd have to change the next block as well, its child, because it no longer has a correct reference, but once you change that block to update its parent, its block hash changes, which means you need to change its child to update it, which would change its block hash, effectively forcing you to remind all of the blocks from that moment on, right? This is how we achieve immutability in Bitcoin. Every block contains transactions. Those transactions are summarized in a hash. That hash is referenced by the child block so that you can't actually change it, and that reference is then reflected in its child, and its child, and its child, and its child in an unbroken chain. So the chain goes two ways. It goes back all the way to the Genesis block, but the ripple effect of a hash change is carried forward to all subsequent blocks and validating them, which is why you can't change the past. Each block also has an amount of Bitcoin in it. This is called the block subsidy, or the issuance, the reward for mining. Miners earn Bitcoin. Where do those Bitcoin come from? New Bitcoin, because each block contains new Bitcoin. In the beginning, 50 Bitcoin per block. After four years, that drops to 25, then it dropped to 12.5, which is the current block subsidy for Bitcoin, 12.5 Bitcoin. In 2020, it's going to drop to six and a quarter Bitcoin, then three and an eighth, then 1.7 something, and it will keep going down until it's one Satoshi and then zero, creating this asymptotic geometrically decreasing supply, which is probably the most famous characteristic of Bitcoin, as in, there will never be 21 million Bitcoin. In fact, if you play out the Bitcoin system, it will mine 20,999,999.9997 Bitcoin, or something like that. Just short of 21 million. There is a great site called the Bitcoin Clock, which you can find, and it shows you in a clock format, time to the next halving of the supply. So we say every four years, Bitcoin's supply is reduced by 50%, but in fact, it's every 210,000 blocks, which at 10 minutes per block is approximately four years. But because of the difference in timing, that can change by weeks, right? It might happen a few weeks early. It might happen a few weeks late. It depends on how accurately that timing will be executed by the Bitcoin network. This is again the meaning of on average, which means really not most of the time. So here you see how the supply drops and the cumulative issuance approaches that line asymptotically. Almost all of the Bitcoin will be mined by the year 2030, and then we're talking about very, very small amounts per block thereafter, asymptotically decreasing to zero issuance by the year 2141. So people often ask me, what happens in the year 2149? Sorry, what happens in the year 2141? It's a really simple answer. I'm dead. We're all dead. It's okay, deal with it. So miners receive two sets of incentives. One is called the block subsidy, and it's new Bitcoin that is minted in every block. And the other one is transaction fees that is the sum of all of the fees of all of the transactions that they put in that block when they mined it. If you look at block 560344, again, this is Alice's transaction block, and you look inside, you'll find the first transaction is one called the coin-based transaction. This is the transaction that rewards the miners. Every block has at least one transaction. That transaction is the coin-based transaction containing new Bitcoin. It can have no other transactions, just one. That's okay. It's valid. And if you look here, what's the amount there? 12.57682767. Can anyone tell me how that number came up? Reward plus fees. So the reward or block subsidy currently is 12.5 Bitcoin, which means that in this particular block, there was 0.07682767 fees exactly included in the transaction. How do we know that? If it was a penny more, this block is invalid. Everybody checked to see that all of the fees add up precisely. A miner can actually pay themselves less, but they can't pay themselves more. Who writes the coin-based transaction? The miners do. So when a miner is constructing a block, this is how it works. They're mining software goes. Let's create the first transaction in this block. I generously give myself 12.5 Bitcoin. No wait, we've got some fees. 12.57627285 signed me. Now that's a great transaction to write. And if you're a miner and you put that in your block, does that mean anybody cares that you put that in your block? No, because this block hasn't been mined yet. Now imagine thousands of miners around the world, each writing their own check. They're all writing to me, because I'm awesome. 12.7567. And they may have different amounts, different fees because they've included different transactions from their different mem pools. And none of those blocks is real until one of them is. The miner who wins has their block accepted by everybody else because they found proof of work. How do they know they get paid? They wrote the coin-based transaction. And that coin-based transaction is meaningless unless their block is accepted by everyone. But the moment it's accepted by everyone, that coin-based transaction is in there. So the payment to the miner becomes real. They can't actually spend it for 100 blocks. It's a mechanism of security in Bitcoin. But it's real now. Thank you so much for coming today. If you enjoyed this video, please subscribe, like, and share. All my work is shared for free. So if you want to support it, join me on Patreon.