What Is: Blockchain

When it comes to hype, few technologies have made it like Blockchain. There’s just something about this software that captures people’s imaginations, while completely bypassing the part of their brain asking annoying questions like “wait, how does this work again?” and “are we sure we want to invest our life savings in this?” At the peak of its popularity in the late 2010s, if you wanted funding for your start-up, all you had to do was tack the word “crypto” onto the company name somewhere.

Explain how you planned to use it, though? Not necessary. Detrimental, even. Blockchain? Super cool. Explaining how blockchain works? The least cool thing in the world.

I should know. I was a research student in a blockchain lab at the time.

Blockchain in a Nutshell

If you only have time to read one paragraph before going back to drinks with your investors, here is the short, simple explanation you were looking for:

Blockchain is a type of online database that tracks financial transactions in a currency called a cryptocurrency by writing down every money transfer in a public and irreversible way.

If you’ve got some time and you’re willing to sit through the supremely uncool explanation of how Blockchain works, thank you kindly, and come with me.

The Trusted Party

Imagine you see an ad for a great pair of sneakers online. Theyโ€™re everything you were looking for, and the price is good. You follow the link to the sneaker sellerโ€™s website. You select the sneakers, add to cart, input your bank account information and address, and click โ€œbuyโ€. Your bank withdraws the money from your account and moves it to the store’s account. Once the store has seen the money enter their account, they pull the sneakers from the shelf and mail them to you.

In this scenario, the bank serves as what is known as the trusted party. Both you and the store are relying on the bank to transfer the money properly. If the bank fails, or decides to take the money and run, thereโ€™s not a whole lot either of you can do. Maybe you could stuff some cash in an envelope, buy an airline ticket and deliver it in person, or send it by mail and make the postal service your trusted party instead. But mostly, you kind of have to trust your bank.

A Brief History

In 2008, trust in banks was in short supply. The worst global financial crisis since the Great Depression was in full swing. After years of predatory lending and risky behavior, banks left and right were going bankrupt and having to be bailed out by governments. Anger and mistrust was at an all-time high, and some technologists started wondering: with all the technology at our disposal, did we really need to settle for trusting banks? Was there a better way?

On October 31st 2008, a person using the pseudonym Satoshi Nakamoto, whose real identity remains unknown to this day, published an article on a cryptography mailing list. The article was titled โ€œBitcoin: a Peer-to-Peer Electronic Cash Systemโ€. In it, Nakamoto outlined the first real-world implementation of a technology theorized in the nineties and known as blockchain: a software that effectively removed the need for trusted parties.

The Innovations of Blockchain

As far as academic papers go, this one is pretty good. Only eight pages long, and relatively clearly written. I’ve linked it above if you want to read it, and get the information straight from the source. If not, we break down the problems and Nakamoto’s solutions for them below.

Challenges Faced

In his paper (in one of his few communications, he claims to be a man living in Japan), Nakamoto starts by highlighting some of the features of the trusted party which any online currency would need to replace.

Identity

This is probably the easiest one to grasp. In an offline purchase, you give the money to the seller in the store, and they give you the shoes. You prove you are the buyer and seller by being physically there.

Online, this is slightly more difficult. When you buy something online, how do you make sure the money reaches the seller? And when they get the money, how do they know it was you who sent it?

When you have a trusted party, this is something they need to do. They know who you are and what your account number is, and once you tell them the shoe seller’s name and bank account number, they will track down that account, even at a different bank, and move the money for you.

Now remove the bank. If there is only you and the shoe seller online, among millions of other internet users, how do you identify yourselves? You’d each need some sort of unique code, which would be public, to work as an id, but at the same time it would have to be secret, or difficult to copy, to prevent it from being stolen and misused.

Luckily for Nakamoto, such codes had already existed for decades.

Digital Signatures

I’m not going to delve too deeply into this topic here, since it is quite complex, and really deserves its own article. Suffice to say, in the eighties, some brilliant mathematicians came up with digital signatures, which do everything we need and more.

In a nutshell, each signature consists of two special numbers: a private key, and a public key. The keys work with asymmetric cryptography, a fancy way of saying that if you use one key to lock something, you need the other key to unlock it. When you have a pair of keys, you publish the public one so people can use it to identify you. The private one you keep to yourself. If you want to send someone a message (or money), you encrypt the message with your private key. The recipient can get your public key to unlock it, and be certain that you are the sender (since only you could have locked it). And vice-versa: if they want to send you something, they lock it with your public key, and you will be the the only one who can unlock it using your private key.

There’s a lot more here, and if there’s interest, I’ll make a separate article, but for now, we can simply say: with digital signatures, you do not need a bank to identify yourself online.

Double-spending

The real challenge faced by the anti-bank crowd, was unfortunately not solved in the eighties. This is known as the double-spending problem, or, how to prevent people from spending the same money over and over again.

With real-world currencies, this is obviously not a problem: once you’ve handed that bank note over to the shoe seller, you can’t go across the street and also give that same bank note to the baker.

When a bank is involved, preventing double-spending is another one of their responsibilities, one they tend to be very good at fulfilling. The bank can track how much money is in your account, and block any attempt at spending more than you have. (Or in the case of credit cards, lend you the money, then make sure you pay them back.)

Now remove the bank. How does the shoe seller know that the coins you are paying with belong to you, and have not already been given to someone else?

The Chain

This is the central innovation of blockchain. The entire history of every coin is written and publicly accessible on the chain.

You read that right: every single time a coin is transferred from one person to another, that transaction and the time at which it occurred is written on the blockchain and everyone can see it.

And that’s why it’s called a chain. If the shoe seller wants to make sure you own the coin you are trying to pay with, and did not give it to someone else yet, all they need to do is go back and look at the chain leading up to that point in time, to see when you received the coin, and whether you gave it to someone else since then.

Then, once you give the shoe seller the coin, that transfer will be written on the next block in the chain (signed with your private key and the shoe seller’s public key), and everyone will know: you gave the coin to the shoe seller.

And that’s how cryptocurrencies work.

Some Definitions

Letโ€™s stop here for a minute, and work on some definitions. Words like cryptocurrency, blockchain, distributed ledger, mining, and every possible type of โ€˜coinโ€™, have been tossed around so much in the past decade, that it’s worth taking a minute to straighten them out.

Blockchain

The technology itself. Think of it as the book in which the bank writes down all the money that comes in, and where it goes. Except without the bank. Just a giant book on the internet that everyone can read.

Cryptocurrency

The currency used in the transactions that are written down on the blockchain. Some banks might use US dollars. Some use Euros, or Yen. A blockchain uses a cryptocurrency, chosen at the time of creation of the blockchain.

Bitcoin cards for sale
Buy Bitcoin at the grocery store checkout line!
Bitcoin

The original cryptocurrency, created in January 2009 by Satoshi Nakamoto to prove his blockchain idea worked. Just as 1 US dollar is 100 US cents, 1 bitcoin is 100โ€™000โ€™000 satoshis.

Mining

This is probably the most esoteric word we need to work on defining here. Mining a cryptocurrency basically means โ€œcreating the next block in the chain for people to write their payments onโ€.

Mining Crypto Gold

Perhaps one of the biggest mysteries around blockchain is how people make money with it (aside from speculation). It’s one thing to be able to trade cryptocurrencies. It’s entirely another to earn them.

The answer is mining, the fancy word for “creating the next block”. Because in order for people to write their transactions on blocks, someone needs to create those blocks first, and this is usually no easy task. So when you mine for crypto, and you find a block, most blockchains will give you a reward in the form of a couple of crypto coins. And so thousands of people have gone out to buy computers and set them up to search for blocks, hoping to earn these rewards.

But wait, you might ask. What’s so hard about finding a new block anyway?

Consensus Algorithms

One of the most fundamental aspects of the blockchain technology is the formula that allows new blocks to be found. There are many different types of formulas out there. They are known as consensus algorithms, and in order to work, they all have to have the following two points in common:

  1. The algorithm must only yield one new block at a time.
  2. Everyone must be able to agree that this is the new block. (In other words, there must be a consensus.)

To understand why these consensus algorithms are such a big deal, let’s examine what would happen if one of these two conditions failed.

The Dangers of Forking

Consensus algorithms often aren’t perfect, and it does occasionally happen that one of these conditions fails. The algorithm yields two blocks at once, and people disagree on which one is the correct one. This is called a blockchain fork, and it’s hugely problematic. Why?

Suppose there is a fork right when you are buying your shoes. Your transfer of your coin to the shoe seller will only be written on one of the two blocks. So if you were that kind of person, you could argue that, actually, the other block is the real one, and according to the other block, you still own your coin, kind of like if your bank forgot to update your account balance after you bought something.

If you want to get philosophical about it, each block in a blockchain represents a version of reality that everyone agrees on. But when there is a fork, there are suddenly two parallel realities, and people can choose whichever one is more convenient for them. You could even spend your coin again on the other block. Forks allow double-spending.

So that’s the whole point of consensus algorithms: to prevent more than one block from happening at once. There are different ways to do this, but we will examine Nakamoto’s original: proof-of-work.

Proof-of-work

Proof-of-work algorithms are deceptively simple to understand. To prevent more than one block from being found at once, they…. make the blocks really hard to find. So hard that only a computer can do it. So hard, that in fact, even with thousands of computers searching, only one will eventually find the solution. (Which is also why blockchain only became a thing when our computing abilities grew with Cloud Computing.)

You may have heard that mining bitcoin uses as much electricity as a small country. This is why. Because to find the next block, tens of thousands of computers across the world are racing to solve an intentionally difficult problem.

So what does a problem like this look like?

For one thing, each iteration is based on the last added block, so the blocks can be ordered neatly in a chain, and no block can be found ahead of time. Let’s look at a toy example.

Imagine that block 0 of the blockchain (also known as the genesis block), has value x. The creator of the blockchain goes through a very complicated and secretive process to create a good value for x. In our toy case, let’s say x = 5.

The proof-of-work algorithm then says that block 1 can be added by whoever figures out x + 2 = y. Being very fast at math, you figure out that y = 5 + 2 = 7. You’re the first to come to the blockchain with y = 7. The chain checks your math, and gives you a coin as a reward. Hurray, you just made money with blockchain mining! You leave with your coin. The blockchain takes the block you found, gets the latest transactions made with the cryptocurrency, writes them down on the block, and publishes the block on the blockchain. The second-to-last transaction written on Block 1 happens to be for 16 satoshis. So the blockchain announces that Block 2 can be added by whoever figures out y + 16 = z. And the race begins again.

Congratulations! Now you know how to make a blockchain!

Blockchain in the Real World

Now all that technical stuff is well and good. But you may be wondering how any of this serves the people actually using the blockchain, for everything from blockchain dating apps to NFTs.

If Blockchain represents one thing, it is the dream of being able to do business with people on the internet without needing a trusted party to supervise. This dream has enticed many into trying to use this relatively expensive technology for relatively trivial purposes without fully realizing the cost or complexity involved. However, there are some genuine use cases for blockchain out there that survived the hype.

Crime

This is not a joke. Using traditional banks is difficult for a lot of criminals because of laws and regulations that require the bank to ask you where you got those thousands of dollars. Blockchain removes the bank, and therefore the problem. Some of the earliest adopters of cryptocurrencies were absolutely criminals.

But with coming regulations and laws around blockchain, hopefully this is a chapter that soon will come to a middle, particularly as law enforcement organizations and crime syndicates alike realize how easy it is to trace the movement of money on the blockchain. When your entire financial history can be read off the blockchain, that money laundering starts looking more like airing dirty laundry.

Supply Chains

Now up to this point, we have taken for granted that the transactions recorded on the blockchain are financial: I give you this amount of money in this cryptocurrency. But for the record, it doesn’t have to be money. Many industries, from postal services to big pharma, need to track items as they are transferred from supplier to buyer, office to office, across the world. And increasingly, companies are tracking these movements with a blockchain, increasing transparency and reliability at every step of the journey.

Investment

Look, I’m not a philosopher or an economist. If you want to talk about the true value of currency, or about how a piece of paper money has value because people believe it has value, you’ll find more suitable blogs elsewhere. But cryptocurrencies do have the value that millions of people put in them in the form of savings and speculation. Bitcoin probably won’t lose value because the C-suite at your bank made some bad choices. It might gain or lose value for just about anything else. Unless you’ve been living under a rock, you probably already know all about the volatility of crypto. But if that’s the type of investment you’re looking for, suit yourself.

Actual…buying and selling?

Believe it or not, but yes. Some people do actually buy things with crypto. It’s currently still a bit too complicated for everyone but those who need to put up with, but yeah, it does happen. Online content creators are one common demographic. People living in countries that chose to invest heavily in crypto infrastructure, like El Salvador are another (results still pending on that bet). It’s not quite ubiquitous yet. But it’s getting there.


Posted

in

by

Tags:

Verified by MonsterInsights