Part one fundamentals 2 Course struCture & Content Preview Course struCture & Content Preview J What is Blockchain? 5 History 5 Overview 8 Definition 9 Blockchain vs Database 11 Is Blockchain Private? 14 Is Blockchain Secure? 16 J How does Blockchain work? 19 Centralization vs Decentralization 23 Advantages and Disadvantages of Blockchain 25 J The Blockchain Network 26 What are public and private keys? 28 What is a node? 31 What is a block? 33 What is mining? 34 What is a ledger wallet? 38 J Types of Blockchain 40 Permissionless Blockchains 41 Permissioned Blockchains 42 J What is the difference between Bitcoin and Blockchain? 44 What is Bitcoin? 45 What is a cryptocurrency? 48 What is a coin? 50 Part 1 - Blockchain Fundamentals 3 Course struCture & Content Preview Course struCture & Content Preview What are Altcoins? 51 What is a token? 51 J Popular cryptocurrencies 53 Bitcoin 53 Ethereum 54 Onecoin 55 Ripple 55 Litecoin 56 EOS 57 Tether 57 Monero 58 J Blockchain applications 60 Digital Identity 61 Machine Learning (ML) 63 Artificial Intelligence (AI) 64 Social Media 65 Bank Use 66 Cryptocurrencies 67 Healthcare 68 Property records 69 Smart Contracts 70 Supply chains 73 Voting 75 J Fears, confusion and misconceptions 76 “Criminals use cryptos because they are anonymous” 76 “Cryptos have no value” 76 “Crypto Transactions Are Anonymous” 77 “Cryptocurrencies Are Volatile, So Blockchain Must Not Be Reliable” 77 4 Course struCture & Content Preview Course struCture & Content Preview “Cryptocurrency And Blockchain Are For Technology And Finance People Only” 78 “Cryptocurrency Is Fundamentally Different From Other Currencies” 78 “The blockchain will bring down the banking system” 78 “All Blockchains Are Public” 79 “All Blockchains Allow For Anonymous Transactions” 79 “The Blockchain Will Solve All The World’s Problems” 79 “The Blockchain Technology Is All Hype” 80 “All Blockchains are the same” 81 “Smart contracts have the same legal value as regular contracts” 81 J Dictionary 82 Glossary of key terms 82 5 Part 1 - Blockchain Fundamentals what is bloCkChain? History Part 1 | what is bloCkChain? B lockchain, as a concept, is not all that new. It is actually a combination of concepts. It is cryptography, internet and protocols. Its origins date back to 1976 when the first time the concept of “digital signed documents” was mentioned in a cryptography paper. This concept was built upon by the idea of “electronic cash” or “digital currency”, the first versions of which date as far back as 1997. The inventor of blockchain technology is considered to be Satoshi Nakamoto, who published a paper on bitcoin in 2008, called “Bitcoin: A Peer-to-Peer Electronic Cash System”. The abstract of the paper was on the direct online payment from one source to another source without relying on a third-party source. The paper described an electronic payment system based on the concept of cryptography. Nakamoto’s paper provided a solution to the double spending where a digital currency cannot be duplicated, and no one can spend it more than once. The paper introduced the concept of a public ledger where an electronic coin transaction history can be traced and confirmed: “We propose a solution to the double-spending problem using a peer-to-peer network”. 6 Part 1 | what is bloCkChain? Figure 1: Blockchain history 1991 - Haber & Stornetta described a system of tim e-stamping digital documents 1996 - Anderson wrote about a decentralized storage system that was unable to delete any updates on it 2002 - Mazieres & Shasha proposed a proto -blockchain (file system with decentralized trust) 2008 - ‘Satoshi’ conceptualized the first blockchain in his seminal paper to serve as the public transaction ledger of the cryptocurrency Bitcoin (based on algorithms and distributed database) 2009 - Bitcoin was offered up to the open source community 2005 - Szabo created a simplified blockchain 1998 - Scheier & K elsey detailed a method to make computers logs unreadable and prevent them from being tampered with, using cryptography 1992 - Bayer, Haber & Stornetta incorporated Merkle (hash) trees in the design 7 Part 1 | what is bloCkChain? An open source program to implement the bitcoin system was released just a few months later and the first bitcoin network started in early 2009 when Satoshi Nakamoto created the first bitcoins. Although the inventor of the Bitcoin remains anonymous, bitcoins continue to be created and marketed with a large community to support and address various issues with the code. There are hundreds of different cryptocurrencies such as Litecoin, Ripple etc., but bitcoins hold the lion share of the market; it has become the most popular cryptocurrency. It was able to attract users due to its ability to keep its users’ identity anonymous, but it became very popular due its transparency. Bitcoin started to flourish since then and by the year 2013, investors started to pour funds on start-ups related to Bitcoin. Bitcoins can be exchanged for regular currency, for any service or product. With the use of wallet software, users can electronically transfer bitcoins using a computer, mobile phone or a web application. In 2015, the Ethereum platform was launched which enabled blockchain to work with loans and contracts. It was based on an algorithm called ‘smart contract’ ensuring the implementation of an agreement between two parties. Due to Ethereum’s ability to offer a faster, safer and efficient environment, the technology became popular. We will delve deeper into different types of cryptocurrencies further ahead. “ “A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution. Digital signatures provide part of the solution, but the main benefits are lost if a trusted third party is still required to prevent double-spending.” 8 B lockchain technology is normally associated with cryptocurrencies such as Bitcoin. It is a database of records of transactions which is distributed, and which is validated and maintained by a network of independent computers around the world. Instead of a single central authority such as a bank, the records are supervised by a large community and no individual person has sole control over it and no one can go back and change or erase a transaction history. As compared to a conventional centralized database, the information cannot be manipulated due to blockchain’s built in distributed nature of structure and confirmed guarantees by the peers. In other words, when a normal centralized database is located on an individual server, blockchain is distributed among the users of a software. Blockchain allows anyone on the network to access everyone else’s entries which makes it impossible for one central entity to gain control of the network. what is bloCkChain? Overview Part 1 | what is bloCkChain? Figure 2: Blockchain overview Information gets added as a “block” on the existing blockchain T ransaction Approved T ransaction Request Broadcast to Network Network Verifies & Records T ransaction 9 “ Whenever someone performs a transaction, it goes to the network and computer algorithms determine the authenticity of the transaction. Once the transaction is verified, this new transaction is linked with the previous transaction forming a chain of transactions. This chain is called the blockchain. Part 1 | what is bloCkChain? what is bloCkChain? Definition Merriam Webster Dictionary and OneLife give the following definition of a blockchain: Blockchain has found its way not only in dictionaries, but only in public discourse among financial experts: “A digital database containing information (such as records of financial transactions) that can be simultaneously used and shared within a large decentralized, publicly accessible network.” “ “ “Blockchain is the tech. Bitcoin is merely the first mainstream manifestation of its potential.” Marc Kenigsberg “The biggest opportunity set we can think of over the next decade. – Bob Grifeld “ “The Blockchain is a digital technology that records and verifies transactions.” OneLife 10 Part 1 | what is bloCkChain? Clearly, people are impressed by the technology and its potential. But what is the technology, really? At its most basic level, blockchain is literally a chain of blocks, but not in the traditional sense of those words. When we say the words “block” and “chain” in this context, we are actually talking about digital information (the “block”) stored in a public database (the “chain”). A blockchain is, in the simplest of terms, a time-stamped series of immutable records of data that is managed by a cluster of computers (nodes) not owned by any single entity. Each of these blocks of data (i.e. block) is secured and bound to each other using cryptographic principles (i.e. chain). Blockchain is a mechanism that employs an encryption method known as cryptography and uses (a set of) specific mathematical algorithms to “ “ “ “We’ll all look back in 20 years and conclude that Bitcoin was as influential a platform for innovation as the Internet itself was.” Marc Andreessen “Online identity and reputation will be decentralized. We will own the data that belongs to us.” William Mougayar “We have elected to put our money and faith in a mathematical framework that is free of politics and human error.” Tyler Winklevoss 11 what is bloCkChain? Blockchain vs Database L ooking broadly, a blockchain might not look that different from things you’re familiar with, say Wikipedia. With a blockchain, many people can write entries into a record of information, and a community of users can control how the record of information is amended and updated. Likewise, Wikipedia entries are not the product of a single publisher. No one person controls the information. If we get into specifics, however, the differences that make blockchain technology unique become more clear. While both run on distributed networks (the internet), Wikipedia is built into the World Wide Web (WWW) using a client-server network model. A user (client) with permissions associated with its account is able to change Wikipedia entries stored on a centralized server. Whenever a user accesses the Wikipedia page, they will get the updated version of the ‘master copy’ of the Wikipedia entry. Control of the database remains with Wikipedia administrators allowing for access and permissions to be maintained by a central authority. Part 1 | what is bloCkChain? create and verify a continuously growing data structure – to which data can only be added and from which existing data cannot be removed – that takes the form of a chain of “transaction blocks”, which functions as a distributed ledger. 12 Part 1 | what is bloCkChain? Wikipedia’s digital backbone is similar to the highly protected and centralized databases that governments or banks or insurance companies keep today. Control of centralized databases rests with their owners, including the management of updates, access and protecting against cyber-threats. Figure 3: Wikipedia page model 13 The distributed database created by blockchain technology has a fundamentally different digital backbone. This is also the most distinct and important feature of blockchain technology. Wikipedia’s ‘master copy’ is edited on a server and all users see the new version. In the case of a blockchain, every node in the network is coming to the same conclusion, each updating the record independently, with the most popular record becoming the de-facto official record instead of there being a master copy. It is this difference that makes blockchain technology so useful – It represents an innovation in information registration and distribution that eliminates the need for a trusted party to facilitate digital relationships. Yet, blockchain technology, for all its merits, is not a new technology. Rather, it is a combination of proven technologies applied in a new way. It was the particular orchestration of three technologies (the Internet, private key cryptography and a protocol governing incentivization) that made the idea of blockchain so useful. Part 1 | what is bloCkChain? Blockchai n Database Figure 4: Blockchain vs Database 14 Part 1 | what is bloCkChain? what is bloCkChain? Is Blockchain Private? Transparency vs Privacy O ne of the most interesting and misunderstood concepts in blockchain is “transparency.” Some people say that blockchain gives you privacy while some say that it is transparent. The fact is that the person’s identity is hidden via complex cryptography, but their public address and all their transactions are not: A single public chain Each computer in the blockchain network has its own copy of the blockchain, which means that there are thousands, or in the case of Bitcoin, millions of copies of the same blockchain. Although each copy of the blockchain is identical, spreading that information across a network of computers makes the information more difficult to manipulate. With blockchain, there isn’t a single, definitive account of events that can be manipulated. Instead, a hacker would need to manipulate every copy of the blockchain on the network. This is what is meant by blockchain being a “distributed” ledger. Figure 5: Transparency vs Privacy 15 Part 1 | what is bloCkChain? This level of transparency never existed before within the financial system. It adds an extra level of accountability. Anonymous or Pseudonymous? Most cryptocurrencies are often described as anonymous because it’s possible to send and receive transactions without giving any personally identifying information. However, achieving reasonable anonymity with most digital currencies can be quite complicated and perfect anonymity may be impossible. Sending and receiving digital coins is like writing under a pseudonym. If an author’s pseudonym is ever linked to their identity, everything they ever wrote under that pseudonym will now be linked to them. For example, in Bitcoin, your pseudonym is the address to which you receive Bitcoin. Every transaction involving that address is stored forever in the blockchain. If your address is ever linked to your identity, every transaction will be linked to you. Pseudonymity Ex: T witte r, Reddit Real Identity Ex: Facebook, LinkedIn Ex: Whisper, Yik Yak Anonymity Figure 6: Digital identity 16 Part 1 | what is bloCkChain? what is bloCkChain? Is Blockchain secure? B lockchain technology accounts for the issues of security and trust in several ways. First, new blocks are always stored linearly and chronologically. That is, they are always added to the “end” of the blockchain. Immutability of the Network Immutability, in the context of blockchain, means that once something has been entered into blockchain, it cannot be tampered with. No one can “work the books” and fiddle with accounts. The reason why blockchain has this unique characteristic is that it has a “cryptographic hash” as a function. In the original whitepaper, it was recommended that Bitcoin users use a new address for each transaction to avoid the transactions being linked to a common owner. Figure 7: Immutability of the network 17 Part 1 | what is bloCkChain? The term “immutability” refers to a state that cannot be changed or modified after it has been created. (On the other hand, a ‘mutable’ object can be changed after it is created.) As it pertains to blockchain technology, immutability implies that data written to a blockchain cannot be edited, even by a system administrator. This is beneficial, especially in financial transactions, in that one can be sure that sent and received data and transactions cannot be altered. Hackerproof Here’s why that’s important to security. Let’s say a hacker attempts to edit your transaction from Amazon so that you actually have to pay for your purchase twice. As soon as they edit the dollar amount of your transaction, the block’s hash will change. The next block in the chain will still contain the old hash, and the hacker would need to update that block in order to cover their tracks. However, doing so would change that block’s hash. And the next, and so on. In order to change a single block, then, a hacker would need to change every single block after it on the blockchain. Recalculating all those hashes would require an enormous amount of computing power. In other words, once a block is added to the blockchain it becomes very difficult to edit and impossible to delete. Hashing “Hashing” means taking an input string of any length and giving out an output of fixed length. A hashing algorithm gives any input a unique length 18 Part 1 | what is bloCkChain? (like an invoice number). No matter how big the input is, the length is always the same. This is crucial for remembering a huge amount of data and transactions. This makes blockchain technology amazingly reliable. Figure 8: Hashing function Cryptographic Hash Function the reverse is very difficult/expensive to comp ute the reverse is very difficult/expensive to comp ute one way hash function the public key is easy to compute from private key the adress is easy to compute from public key one way hash function 19 how does bloCkChain work? P icture a spreadsheet that is duplicated thousands of times across a network of computers. Then imagine that this network is designed to regularly update this spreadsheet and you have a basic understanding of the blockchain. In simple terms, the blockchain can be thought of as a distributed database. Additions to this database are initiated by one of the members (i.e. the network nodes), who creates a new “block” of data, which can contain all sorts of information. This new block is then broadcasted to every party in the network in an encrypted form (utilising cryptography) so that the transaction details are not made public. Those in the network (i.e. the other network nodes) collectively determine the block’s validity in accordance with a pre-defined algorithmic validation method, commonly referred to as a “consensus mechanism”. Once validated, the new “block” is added to the blockchain, which essentially results in an update of the transaction ledger that is distributed across the network. In principle, this mechanism can be used for any kind of value transaction and can be applied to any asset that can be represented in a digital form. Someone requests transaction. P2P network consisting The requested transaction is broadcast to a of computers, known as nodes. The transaction is completed. Validation A verified transaction contracts, records or other information. can involve cryptocurrency Once verified, the transaction is combined with other transactions to create a new block of data for the ledger. The new block is then added to the existing blockchain, in a way that is permanent and unalterable. Part 1 | how does bloCkChain work? Figure 9: How does blockchain work? 20 Part 1 | how does bloCkChain work? Information held on a blockchain exists as a shared — and continually reconciled — database. This is a way of using the network that has obvious benefits. The blockchain database isn’t stored in any single location, meaning the records it keeps are truly public and easily verifiable. No centralized version of this information exists for a hacker to corrupt. Hosted by millions of computers simultaneously, its data is accessible to anyone on the internet. How is the information verified? Not all blockchains use the same technology to do this, but the process through which the network verifies a transaction is called “reaching consensus”. Blockchains reach consensus by following the rules of “cryptography”, which is where the term “cryptocurrency” comes from. Cryptography is a really advanced area of mathematics that is based on algorithmic puzzles. When the blockchain and its users are able to solve the algorithmic puzzle, the rules of cryptography state that a transaction is valid and authentic. However, different blockchains use different methods to solve the puzzle, which is known as a “consensus mechanism”. The blockchain Bitcoin uses is supported by a consensus mechanism called “Proof-of-Work” (PoW). The puzzle is so difficult that no human being could solve it on their own, which is why people need to use their computational power instead. Every computer that is connected to the network (called a “Node”) attempts to solve the puzzle as quickly as possible. Whoever solves the puzzle first, gets a reward – a free, new Bitcoin. However, in reality, the Bitcoin