Welcome to Blockchain 101!

In this article (and future ones), I will try to summarize the basics of blockchain, cryptocurrencies, smart contracts, and much more, and I will be happy to answer any questions you may have in regards to this technology.

Even though the articles won’t go too deep into technicals (unless I am asked to), I assure you that if you read through them, you will know more about this technology than 99% of people out there.

Lets start with a brief introduction about the origin of the blockchain technology.

Intro: cryptography and cypherpunk movement

Modern cryptography originated during World War II as a response to the radio communication technology which allowed the instant wireless transmission of vast amounts of information from almost any location. The obvious shortcoming to radio was that anybody else with a receiver could be listening in – including the enemy. The apparent solution was to encrypt or encode radio transmissions.

During World War II both the United Kingdom and the United States created massive national encryption and code-breaking efforts. Two cryptographers at one of these organizations, Britain’s Government Communications Headquarters (GCHQ) came up with the basic concept utilized by cryptocurrency in the early 1970s. James Ellis came up with the idea for non-secret, or public key encryption; an encrypted message that contained the key to unlocking the encryption. Clifford Cocks came up with the mathematics that made it work.

The next group of people to become interested in cryptography were computer scientists and users in the 1980s. Their problem was the same one the military had with radio, how to keep information secret in an open environment – the internet.

Small groups of hackers, mathematicians and cryptographers began working to make public-key encryption a reality. The idea had been publicized in the 1970s, and largely picked up by few intellectuals including David Chaum. Chaum’s ideas included untraceable electronic mail, digital signatures, and digital secret identities. It was Chaum who first proposed cryptocurrency in 1983, in a paper called Numbers Can Be a Better Form of Cash than Paper. Chaum predicted that electronic cryptocurrency might be as anonymous as paper money, but as convenient as a credit card.

By the 1990s a movement of “Cypherpunks” had emerged and was hard at work trying to make Chaum’s ideas reality. The Cypherpunks were an offshoot of the cyberpunk movement; which combined fascination with the internet and computers with a love of 1980s and 1990s counterculture. The goal of the Cypherpunks was to use the tools of encryption; invented by the military-industrial complex, to protect individual freedom. They laid their basic ideas out in “A Cypherpunks Manifesto” :

“Privacy is necessary for an open society in the electronic age. Privacy is not secrecy. A private matter is something one doesn’t want the whole world to know, but a secret matter is something one doesn’t want anybody to know. Privacy is the power to selectively reveal oneself to the world.“

The true identity of the creator of bitcoin is still unknown but it is obvious that he, she or they came out of the Cypherpunk movement.

What is bitcoin?

On Oct. 31, 2008 an unknown person or group of people known by the pseudonym Satoshi Nakamoto published a paper called “Bitcoin: A Peer-to-Peer Electronic Cash System.“

Bitcoin is two things, a decentralized payment network (bitcoin) native to the internet and the digital currency (Bitcoin) native to that network. It is public and permisionless so anyone in the world can help run the network, see the transactions on it and create a bitcoin wallet for themselves to send and receive the Bitcoins.

The reason bitcoin represents a breakthrough is that this is the first time it’s been possible to send a digital object throught the internet without simply sending a copy. Before, if I sent you a text message, a photo or a word document I was always sending you a copy. With Bitcoin I can now send you that Bitcoin and the whole world can be certain that now you have it and I don’t.

Transactions in this network are sent a peer to peer and there is no central authority who process these transactions. This is very important, because prior to bitcoin, payment networks used to have a central authority in order to avoid the double-spending problem.

What is the double-spending problem?

Double-spending is a problem in which the same digital money can be spent more than once. In other words, double-spending is an instance in which a transaction uses the same input as another transaction that has already been broadcast on the network. This is a flaw that is unique to digital money because digital information is something that can be reproduced rather easily.

Physical money do not have the same double-spending issue that is faced by digital money, because a coin or a bill can only be in one place at a time. Either I have or you have it.

The initial approach to solve this issue with digital money was to have a central authority who was responsible for validating and processing transactions, and keep and updated table with accounts and balances. Bitcoin was the first system which was able to solve this problem in a decentralized way and tries to mimic physical money on the internet.

What is proof of work and mining?

Proof of work is the mechanism that bitcoin and some other blockchains use to reach consensus about the state of the network. In addition, it has also a second purpose, the creation (minting) of new coins as a reward to the miners that participate in this competition. Computers who take part in this competition are usually known as ‘miners’, because of the simmilarities with the work requiered to extract gold from mines.

What is this competition about? Well, miners have to find by brute force a number, the nonce, which meet certain criteria in order to create blocks in the blockchain. As a reward for the computacional power required to find this number they receive brand new Bitcoins. Every ten minutes on average a new block is created and new coins are minted.

Every approximately four years, the number of Bitcoins that are created with every new block are cut by half. This event is usually refered as the bitcoin ‘halvening’ or ‘halving’. Since these rules are written in the code, it is easy to know the total number of Bitcoin that will ever exist:

What is a wallet?

Bitcoin and other blockchains use asymmetric or public key cryptography so that the person holding the private key associated to public key can spend the Bitcoins associated to that public key. You can think of the public and private keys as your bank account number and the password to access it. The public key can be shared with others but the private key must be kept secretly.

This is a topic of confusion to a lot of people because technically the Bitcoins shown in your wallet are not stored inside that wallet but is merely a reference to that address in the ledger. Whoever owns the corresponding private key associated to that address can spend those coins. Wallets are a custody solutions for your private keys (and therefore your Bitcoins).

What is blockchain?

The term blockchain derives from ‘block chain’ or ‘chain of blocks’ and refers to the way bitcoin and other distributed ledger technologies process and store the transactions.

Each block is a batch of transactions. These blocks are then added to a linked list of blocks which are sorted sequencially as they are created. Every time a new block gets added to this list of blocks it is given an identifier, the block hash, based on the data it contains which identifies the block uniquely. But also, a block contains the block hash of the previous block so that in some way, it contains a summary of the entire blockchain history. The cool thing about this is that if someone tries to change even the smallest piece of data in a block of the blockchain, the hashes of the subsequent blocks would need to change as well to keep it consistent. Considering that everyone running the software has a exact copy of the entire blockchain and they can notice any change to the ledger, it makes blockchain very secure and tamper-proof resistant.

Note: Even though ‘blockchain’ technically only refers to the data structure used to store the history of transactions, it is commonly used also to refer to distributed ledger technologies which comprise of four main components: a peer-to-peer network, a distributed ledger (the ‘blockchain’), a consensus mechanism, and a descentralized system to validate transactions.

What is ethereum?

As mentioned earlier, bitcoin is a payment system. You could say that bitcoin has a single purpose: transfer value. Is it possible to have other types of blockchain platforms where users can implement multiples use cases? Yes, and this is where ethereum comes in. Ethereum is a general purpose blockchain platform that allows users to create infinite number of uses cases on top of it by creating and deploying ‘smart contracts’. Ethereum is sometimes refer as the world computer.

What is a smart contract?

Smart contracts are computer applications that can be created and live in the blockchain. Because of the proper nature of blockchains, these smart contracts have unalterable predetermined terms and are run in a decentralized way. This allow to have unstoppable applications that will run as they were programmed so people don’t have to relay in a third party to execute this contract written in formal languages and are not subject to interpretation.

What can be programmed in Ethereum and other smart contract platforms? Basically anything you can imagine. Ethereum and other platforms, contrary to bitcoin, use Turing complete languages. This means that theorically there can always be found a program that solves any computational problem.

What is ether and gas?

Ether is the ethereum’s native criptocurrency and has 2 main goals:

Transfering value among accounts in the ethereum network, just like Bitcoin in the bitcoin network. Paying for the use of resources in the network. Basically, it is the way users can pay miners for running their code. This also servers as a way to disincentivise spamming and denial of service (DoS) attacks.

For each transaction, the sender must indicate how much they are willing to pay for their code to be executed. It the execution of the transaction exceeds the amount of gas provided, the execution will stop and the transactions will fail.

Ding! Ding! Ding!

And our first Blockchain 101 class has come to its end. Feel free to ask any questions or topics you would like me to cover in futures classes. See you!