Transactions and Proof-of-Work Mining

Learning

So you worked your way through the (L)earn Bitcoin Course but still you don’t understand how transactions work or what Proof of Work mining and a blockchain is. No worries, learning Bitcoin requires going back and forth while deepening single topics. This presentation from the Indonesia Bitcoin Conference 2023 offers a comprehensive introduction to Bitcoin and shows exactly how everything is working together. It is suitable for beginners as well as for those who want to deepen their knowledge.

00:00 Introduction
01:18 What is Bitcoin?
05:23 What are important properties of Bitcoin?
08:34 What is the prehistory of Bitcoin?
12:38 How do Bitcoin transactions work?
15:45 What is the Proof-of-Work mining?
20:16 What is Bitcoin’s fixed supply?
21:29 Why are the transaction fees so important?
25:05 Closing

Transcript

I’m the founder of Bitcoin for Fairness, which is a non-profit initiative, whose goal it is to bring Bitcoin education to countries where I think that people need it the most. I’m also the author of (L)earn Bitcoin, a book for Bitcoin beginners and I recently published an online learning platform called Crack The Orange. That’s why you have those stickers on your seats. And I spent 12 months recently in Zimbabwe, Zambia, South Africa, and Ghana to educate myself and learn from the people there, what their problems with money are. And I believe they are very similar to the problems with money that people have in Indonesia.

What’s the content of this half hour? It’s about what is Bitcoin, the history of Bitcoin, background, and the properties of Bitcoin? What is needed to send and receive bitcoin? How do Bitcoin transactions work? What is mining? And then transaction fees. So, I try to cover everything for people who are new to Bitcoin and maybe also for those who are a little bit more advanced.

So Bitcoin first and foremost is ownership. You all know this: This is a bank note, an Indonesian bank note, and Bitcoin is basically something that you can own like a bank note. So you are the only owner of your bitcoin. You don’t need a bank account to use it. So you also don’t need an ID or a registration. There’s no centralized control in Bitcoin. Like with that bank note, the bank note is issued by the Central Bank of Indonesia. So bitcoin also doesn’t have the national inflation that our currencies all around the world have. Yes, there’s volatility in bitcoin, the price goes up and down. That’s a risk. But the supply of bitcoin cannot be inflated by any government or any central authority. So bitcoin is basically money from the people for the people. And when we speak of ownership in Bitcoin, we always say “self-custody”, your bitcoin in self custody. This is an important word, the opposite to custody, which is when you have your bitcoin in an exchange, which is basically like a bank account. So you don’t own the bitcoin on an exchange, even if you have the password to your account.

So what do you need? So first and foremost, you need a self-custodial wallet like this. This is the Green Wallet or the BlueWallet. These are the two I recommend. Funnily, they have names of colors. That’s just a coincidence. And then this wallet, when you install it on your phone, it gives you a so-called seed. The seed is basically the master password of all passwords for your bitcoin, it looks like that. I mean, that’s just an example. It’s 12 words in a certain order. And you have to write down these 12 words because they will always give you access to your bitcoin. Even if you lose your phone or your phone is corrupted or it’s stolen, you leave it behind whatever. And please store it securely offline. Don’t make a screenshot of it. Don’t put it in your password manager. Don’t send it anywhere or anyone. No one needs to know your seeed. Only you need to know where you find it, where you have stored it safely.

Bitcoin is also frictionless payments because as soon as you have this on your phone, you can open it up and say, receive bitcoin. And then it shows you a QR code and a line of letters and numbers, which is a Bitcoin address. And with that Bitcoin address, you give it to the sender, the person who wants to send you the Bitcoin. And this person also has a Bitcoin wallet. They say send. And in that moment, one can either scan the QR code, so the other person scans the code on your phone or they copy the Bitcoin address into their wallet. And then you can see, the other person has the address of your phone, your Bitcoin address in the wallet and can send the money to you and you then receive it. And that’s basically all. So actually it’s very easy. You can receive bitcoin anywhere where you are, where you have internet and where you have your wallet. So it’s much more convenient than if you receive remittances from abroad, for instance. You need to travel to Western Union or to the bank. You don’t need to do this. And here in Indonesia I heard it’s only legal to hold it as an asset, but yes, you can also exchange it to local currency or spend it otherwise.

So Bitcoin in general, as you saw, it’s easy to use, but very complex to understand. If you want to go a little bit more into the depth of it, if you want to understand more. So please don’t be discouraged. Learning about Bitcoin is like an onion. You peel a layer and then there’s the next layer and on and on and on it goes.

Bitcoin has unique properties that make it a unique money that can be used to help people who are under financial oppression or cannot send money in and out of the country because they’re censored, because they are an NPO, for humanitarian activists who are very often cut off from their bank account. And Bitcoin has these properties that makes it a tool that you can use when you are not allowed to exchange money globally, permissionlessly.

So Bitcoin is like a R.I.P.C.O.R.D. (that’s from Andreas Antonopoulos). It’s revolutionary, it’s immutable, it’s public, it’s collaborative, it’s open, it’s resistant to censorship, and it’s decentralized. So we are going to go into that a little bit more in detail later. So Bitcoin is a multifaceted technology. It has parts of cryptography in it, peer-to-peer networks, game theory also like incentives for miners, for instance, and the blockchain. I think that word everyone has heard right now, which is actually just a database which is storing all transactions from the beginning of Bitcoin in the chronologically correct order. Bitcoin is also pseudonymous. That’s why I said before, you don’t need an ID. You don’t need your name to register and use Bitcoin.

The first person who was also pseudonymous was Satoshi Nakamoto, the inventor or discoverer, I would say inventor of Bitcoin. And Satoshi Nakamoto published a Bitcoin white paper in October, 2008. And on the 3rd of January in 2009, Satoshi Nakamoto published the first public block of the blockchain. So the software was basically released. And why do I say Bitcoin is also a grassroots movement? Well, first it won’t be a coincidence that it was released in 2008/2009, the time of the big financial breakdown in the world, and also the time of Occupy Wall Street. And Satoshi Nakamoto put the headline of the times of the January 3rd, 2009 times into the code of the first block, the so-called Genesis Block. I assume that Satoshi Nakamoto wanted to release and give us Bitcoin to have an alternative to the current traditional financial system.

Bitcoin is also an evolution because, we also have a long history of different sorts of money. And the predecessors of Bitcoin actually started long ago. I mean, cryptography has been used since thousands of years. Ans then in the 1960s, the US Department of Defense started the Arpanet, the beginning of the internet, which is a peer-to-peer network. And from then on we had discoveries and inventions, which led to the first digital money eCash in 1982 by David Chaum. It was anonymous, so very private, but it had one problem, it was centralized. And then with the invention of Hashcash by Adam Beck, Cynthia Dwork and Moni Naor at the same time, that was the invention of the proof of work process that is now used in Bitcoin. Then we had B-Money with a distributed network, Bit Gold, and finally in 2008 it was Satoshi Nakamoto who solved the so-called double spending problem, which was a problem in IT and digital money. Because I mean, if you assume there’s Bob. Bob wants to buy something from Sally with a digital coin or let’s say a digital file, imagine a PDF file. Everyone knows a PDF file. You know that you can copy it at no cost a thousand times. And then you can say to Sally, that’s my money, that’s my digital coin, but in the back I can copy it. And I also buy something from Charlie with the same money, with the same coin, with the same file. And that problem was solved by Satoshi Nakamoto. And so what’s the big difference then now because now I have solved that double solving problem? I don’t need an intermediary anymore who controls the system that everything works in a correct manner? So in a PayPal transaction, for instance, we have up to seven intermediaries. So when Bob wants to buy something on PayPal from Sally, PayPal is going to visa, visa is going to Bob’s bank, Bob’s bank is going to the clearing house, and finally the clearing house sends the money to Sally. And Sally then can send the goods, the clothes to Bob. Whereas in Bitcoin, it’s rather simple. Bob sends Sally the bitcoin, Sally sends the clothes. So no intermediaries, no need to trust anyone else but you with your seed.

Bitcoin is also decentralized. What does that mean and why is it important? Every transaction, this has been done since the beginning of Bitcoin, has been stored in the chronologically correct order on the blockchain, a database. And this database is synchronically on every computer, every node, every full node in the Bitcoin network saved or stored. So we have like a hundred thousand copies of that transaction history, which makes it hard to attack it. And this blockchain database with all the transactions can be downloaded by anyone. You don’t need a permission or anything to start using Bitcoin, uploade it, install it on your computer and run the Bitcoin software and become a full node. And this decentralization, of course, is also a part of Bitcoin censorship resistant resistance. It’s hard to imagine how this all works. So that’s why I use this example of Bitcoin is basically like a public deposit box where anyone can deposit something. So if someone knows my Bitcoin address, anyone in the world can send me bitcoin. And this box, which represents my wallet, has thousands of Bitcoin addresses in it. And to each address, you can send something. So the boxes are identified through the Bitcoin address. And these Bitcoin addresses are associated with the so-called private key. If you own the private key, you own the bitcoin in that box and all those private keys, you don’t need to take care of that. Your wallet is start doing that for you with the seed that we saw before. So the seed is like a key chain that unlocks all the boxes for you.

So sending transactions, how does this work a little bit in the background? So your wallet generates a transaction and therefore it uses some kind of cryptography and magic. So from the private key, your wallet renders or calculates a digital signature. And all that you have to do then is to put in the recipient’s Bitcoin address, say how much you want to send and add transaction fees. And then you can send it and the wallet is broadcasting the transaction for you into the internet, basically into the Bitcoin peer to peer network. And then this transaction enters all of the nodes I was talking before. So basically the transaction goes to the first node, and from there it’s being propagated to all the nodes in the network. So they all have the same transaction, they see it, they see it coming in. And then there are some so-called mining nodes, they also see it coming in. And these nodes validate the transaction. Does it fulfill all the rules that are in the Bitcoin software?

So if every node validates their own copy of the ledger, how does the system agree on a single truth, on a single version of the ledger? What prevents double spending or counterfeiting coins? Because bitcoin cannot be forged, forged like bank notes or gold. What prevents modifying the history so that anyone can change your transaction? And how is the bitcoin supply issued in a decentralized way? The answer is mining. Proof of work mining is the answer to all these questions. It secures the whole network in a decentralized way. And now, I am going to try to explain the steps. These are a few Bitcoin mining devices. They are specialized computers. They only do calculations for the Bitcoin network. And there are Bitcoin mining companies who have huge spaces filled with thousands of these computers. And their work is, to check if the transaction is being validated, does it fulfill the consensus? Then they add the transaction to a new block on their computer. So they build a new block and then they start running the proof of work calculation, which is basically trying to find a certain number. There’s a target number, and the computers have to find that number by calculating, adding a number to something all the time, all the time. And the first miner who wins this race to find the right target number, that block of that mining machine is attached to the blockchain. And each node in the whole network then confirms that and says, yes, this miner has worked in a correct way, everything is fine, I accept this block. And then this winning mining machine or the company behind or the person behind receives 6.25 bitcoin for that work, plus the transaction fees everybody paid. All the transactions with the transaction fees that are in that one block, that’s also what the miner is earning. So this is a scheme, it’s of course not the real blockchain, but I wanted to show you how this is connected and why it’s called a blockchain. So first, you have as an example a block with data in it, a block number, the nonce, which is the number where the computer is working, and the transaction data. And at the bottom you see a hash. A hash is basically a fingerprint of the content in the block. So if you only change one number, like 285 to 286, the whole line down there is changing and that’s how you can prove that the content hasn’t been changed. And then every 10 minutes, a new block is being added. And as you can see, the hash on the left side is inside the next block. And from that, a new hash is being calculated and generated and that hash is in the next block. And that’s how Bitcoin blocks are changed, chained together basically. And as soon as someone tries to manipulate, for instance number two, the middle block, the whole chain breaks apart. And that’s what is being prevented, that prevents the altering of the blockchain.

So what does blockchain even mean? There is a nice block explorer. It’s called by mempool.space, which visualizes the blocks. And what you can see on the right side, these are the mined blocks, and on the left side are the blocks that are still in the mempool and wait to be mined and to be confirmed. And this is all connected. On the right hand side, you have the Bitcoin address, you have a private key, which is part of the mnemonic seed, and then your wallet and the wallet controls also the other keys for the other addresses.

And Bitcoin is basically code. I always wanted to see something like that because I didn’t understand what is a block? A block looks like that. On top there’s the hash that we saw before, the previous block hash, the next block hash. And then these are all transactions. That’s the way how transactions look on the blockchain.

And also a specialty of Bitcoin is its fixed, is it has a fixed supply. There will never be more than 21 million bitcoin. And those new bitcoin are created via mining currently, as I said, 6.25 bitcoin per block. But every four years that amount is being halved. And that’s upcoming next year again in 2024. So the issuance in every block is put in half. What does that mean? It means that if the demand for bitcoin stays the same, but the supply is halved and it’s like a good, then the price might go up and then it’s 3.125 bitcoin that are being mined in the future. And it’ll be 21 million max. because this is like a curve. Every four year, the supply, the new issued supply is put in half and that whole thing ends in 2130, but mining will go on. So it’s not stopping there because mining is securing the Bitcoin blockchain. And now we are here, 93% of all bitcoin are mined already.

Bitcoin also has some incentives from game theory, like in the transaction fees. Why are transaction fees important? First, in the future it’s being used for the miners to pay them for their work. It also prevents spam transactions. Interesting in Bitcoin is that the transaction fees are calculated by data size and not the amount of money you send, which is very different to the current system. And then you get an estimation of the wallet, how much fees you should send, and the faster you want this to be mined to be inside of a block and confirmed, the higher the fee you need to take because it’s a fee market. The person who pays the most for transaction fees, this transaction will be mined first because miners want to earn money. And you can also see these transaction fees, the current transaction fees on this blockchain explorer where it shows you on the left side iff it’s very slow, you only pay six satoshis per byte. If you want it faster, you pay up to 30 satoshis per byte.

And the great thing is that Bitcoin is immutable. So you can see the mining still takes time. My transaction that I received, it’s still unconfirmed. What does it mean? It means it’s still on the left side. It hasn’t been mined. But here I can see one of six confirmations. So it’s here with one confirmation, which is on the other side of the mining, it has been mined, it has been confirmed, it has been settled. That means the con the the payment is basically yours. And we say always wait until six confirmations if it’s a higher amount of money, because then it’s absolutely immutable.

And Bitcoin is a common good. That’s also very interesting. It’s like the internet and we can compare it a little bit, like say e-mail. How does email work? We all don’t know how email works. We just use it. The same is for Bitcoin actually. But it’s nice to see, I think. So we have the internet protocol, then we have the, so-called SMTP protocol. And on top of that we have our software, like Gmail or Outlook or whatever. In Bitcoin it’s similar. We have the Bitcoin blockchain on the basis, then we have the protocol to transfer the cryptocurrency, bitcoin, and the application layer, the digital currency and the wallets. And as you’ve seen before, there are blocks and these blocks have a certain size. So at the moment you can have like maximum 4,800 transactions in a block. So that’s of course not feasible. If anyone in everyone in the world wants to use Bitcoin, that doesn’t work. And that’s why we now have something called the Lightning Network, which enables you fast and cheap micropayments. Because maybe you’ve seen sometimes the transaction fees on Bitcoin go very high. So if you have to pay like $5 for a transaction and you only want to send $3, it doesn’t make sense. But with Lightning you can do that. You have also more privacy on the Lightning network. You can use it for daily spendings. There are completely new business models developed around it. Like you can tip someone online now or in gaming it’s being used.

Scroll to top