The second module in DeFi Infrastructure takes a much more detailed look at the foundations of decentralized of finance. We'll talk about blockchain, which I've just introduced. Cryptographic hashing, cryptocurrency in a little more detail. Smart contracts, oracles, stable coins, and little more on decentralized applications. That's where we're heading. Let's start with blockchain, and let me give a basic introduction. Blockchain, again invented by Haber and Stornetta in1991, is basically a software protocol. That's like one way to think about it. There's no one blockchain. This an idea that is a very general idea. Bitcoin's blockchain is different than the Ethereum blockchain. Potentially there's thousands of different blockchains, but they do have commonalities in terms of basic items, like allowing multiple parties operate under shared assumptions and data. This is key without trusting each other. That's much different than centralized finance. There needs to be some level of trust. The trust here is within the technology, not the different parties. The data that we're talking about for blockchain could be anything. It could be a transaction where I transfer some in Ethereum to somebody else, but it could be location, destination, and information. Could be supply chain details. This is a very general technology. The idea is you've got this record, it's tamper-proof, and it's open and people can see it. I give an example in my course. You go into the grocery store, you see some lettuce that supposedly organic, has got a QR on it, you scan it, check a blockchain construct that tells you when it was packed, where it was packed, were the farm is organic, every single hop on the supply chain, and how long has been on the shelf at the grocery store. Again, this is a very general idea. Part of the basic structure is the blocks and the chain that links the blocks. I'll have to go through in some detail as to what that means. But in the bottom line, it's just really easy to do an audit. That means you can trace all of the transactions. You can figure out the balance of any address. It's very, very straightforward technology. Here is the article that I mentioned, Haber and Stornetta in 1991. There is a lot of misunderstandings that people think that blockchain was invented by Satoshi Nakamoto. It's just not the case. The idea was invented by Haber and Stornetta. Let me try to describe what's going on with a blockchain. It's a ledger. Think of it as a spreadsheet. Indeed, sometimes I pitched the idea in the following way. Excel is a spreadsheet, unless you get 200 rows in the spreadsheet. Well, anybody could go edit, let's say, row 100 and change the spreadsheet. In a blockchain technology, you can add but you can't edit. You can add row 201, but you can't go and change row 100. But it's different. It's not just a single spreadsheet that I've got on my desktop. This is a distributed ledger. This is what a distributed network looks like. Notice that there's no single point of failure, that if some of the nodes in the network go offline or are corrupted, it doesn't really impact the network because there's so many copies of this ledger. There is extreme redundancy. The other attributes are transparency which we've talked about and immutability. Again, you can add that. Think of the row 201 in to the ledger but you can't go and edit the history. Now I say you can't do it, but I need to prove to you that you actually can't do it. This is what it looks like. These are some blocks and the cryptographic security is quite elegant. We've got transactions in these blocks. Basically, look at the arrows connecting the last line of one block to the next line of the next block. Last line of the block to the far left is connected to the first line of the block in the middle. That is going to be important for us. Basically, that last line of the block, think of it as a fingerprint that's unique to all of the content of the block. The block has got many transactions in it. Then there's a fingerprint that we call a cryptographic hash that's unique to all of that data. What I mean to be clear, if I alter even in the most subtle way, the data, the fingerprint changes. The key thing here is the fingerprint for that first block on the far left is repeated as the first line of the next block. The record, the fingerprint, or cryptographic hash of the block on the far left is repeated in the first line of the middle block. Then when the middle block is filled up with transactions, similar thing happens. We get a new fingerprint that takes all of the data, all of their transactions, including that fingerprint at the very top. Again, that's unique to the second block and it is repeated at the very top of the block on the right. This is why it's called a blockchain. There are blocks and the chain is the link between the last line and the first line. There's commonality that puts them all together. Hopefully, you can see already the beauty of this idea. For example, if it was the case that the block on the left somehow got corrupted, well, if it's corrupted, then the fingerprint at the bottom is going to change. Then it won't match the first line of the next block. The network seizes as about the chain is broken, let's replace that block on the left with a copy that actually does work. This is really important property that gives this technology its immutability. If we need to add to the blockchain, we add a new block, we don't go and edit the past. You can see all of these blocks for Bitcoin going back to the very first block which is called the Genesis Block, same thing for Ethereum. Everything is wide open on the Internet. Anybody can download a complete copy of the blockchains. What about security? The key idea here is the cryptographic hash or the fingerprint as I've called it. If there is any alterations, so I say that you can't edit a blockchain, but let's suppose that I actually do. Remember I said that anybody can download, let's say the Bitcoin blockchain. Let's say I do that. Let's say that I change a block. I can do that, just edit it. But again, the same problem will occur. That when I edit the block, the cryptographic hash at the bottom will change. When that changes, the network sees that the block has been corrupted and there will be a search to find the block that actually fits. It's futile. It's futile to actually try to change because if there's any corruption, it's immediately seen. Because the chain is broken and the block will be replaced and there's plenty of copies of the uncorrupted blockchain across all of the nodes in the network.