I. Consensus

Blockchain In Plain English

Intro

This is not yet another post, written by a tech geek, to another tech geek. The knowledge gap between the blockchain space and the community is getting wider day by day. The aim of this series is to explain how Blockchains work in the simplest manner, so that an average person can easily understand it.

There will be 4 posts:

  1. Explaining what is a blockchain (and what it is not). <- you are here!
  2. Solving the ordering problem (double-spending) in a blockchain.
  3. What does Proof of Work (PoW) solve, and why is it necessary?
  4. Proof of Work in a nutshell (forks, immutability, longest chain, etc.).

Enough chit chat, let’s start! One of the best ways to understand blockchains, is to design one ourselves (no worries, it’s really simple). Imagine we are Natoshi Sakamoto (that was an attention test). And we are gravely wounded by the centralization. Our every individual cell is hating the authorities. Why? Because authorities can manipulate the reality (the documents, transactions, in short: the information). And authorities themselves, are the ones who are verifying these information. You go to the government to prove your document is not fake. So it is extremely easy for the authorities to cheat, lie, or manipulate the information.

Side note: money is becoming a digital asset, in other words: information. Hence, the danger is becoming even greater.

Second side note: If you want to read a comparison between decentralized vs. centralized systems, here it is

If we can find a way to store information and relay it, in a secure way, that does not require verification from authorities, we will solve this problem! Woohoo, utopia!


A Word Document Instead of A Database

Everybody knows Microsoft Word, right? And we can use it as a great starting point for our metaphor.

There is a very important assumption in all blockchain systems: The majority is honest. For the sake of simplicity, let’s have one more assumption for now, that we will get rid of later: Everyone is an angel, nobody is capable of lying :)

Here is our imaginary scenario:

So these 5 men, tries to implement their distributed ledger (yet another fancy word for a blockchain). They will use Word for that. And remember, these 5 people are angels, hence, cannot lie. Here is what they should do:

  1. They rip off their real money, and record everyone’s initial account in their own Word document. The amount of money they rip off, will be their initial account in this case.
  2. Record every new transaction in their own Word document.

If they all do these steps, in the end, all of them should end up with the same Word document. Sal’s Word (accounting book) should be identical to Joe’s.


A Small Example

Sal: Hey Joe, your coffee does smell delicious!
Joe: Wanna sip? 5 dollars, please.
Sal: I thought we were friends
 Here, 5 dollars (sips from Joe’s coffee).

Everybody enters a new record in their word document:
-5 from Sal's account, +5 to Joe's account.

Joe, John and James

Sounds ridiculous, right? This is exactly what’s happening at the core of blockchains when all the other important details are eliminated.

What is the difference between this Word ledger, and banking:

  1. In daily life, Joe does not know how much money Sal has. If Sal wanted to pay Joe, they would need a bank to verify that Sal has enough money in his account.
  2. By this approach, they did not need a 3rd party to verify their transactions, since they all know what others had in their accounts initially, and all the transactions happened/happening. Remember, even Brian, James and John did update their Word document when Sal paid Joe, although they were not a part of that transaction. Everybody knows everything in this system.

Back To The Reality, People Do Lie
 Especially About Money

After Sal paid Joe 5 dollars, just for a sip, he is storming mad! He goes to Brian, says: “Brian, you know what? Joe really pissed me off. Why don’t you and I add 1 million dollars to our balances? So that, Joe will be poor compared to us.” “I agree, Joe deserved it. Ok, but what about James and John?”

“I don’t care, their name also starts with ‘J’.”

“Makes sense.”

So, Brian and Sal, happily modify their word document like the following:
+1000000 dollars to Sal, +1000000 dollars to Brian.

Brian being a little bit smart, figures out: “Sal, where did that 1000000 dollars come from? If that is a transaction, there should be some account losing 1000000 dollars, transferring that to mine, so that I can add 1000000 dollars to my account. This looks ridiculous now.”

Sal agrees: “You’re right. Let’s undo that 1000000. Just delete the transaction that I paid Joe 5 dollars for the coffee sip then”.

5 minutes later, their old friend Pete burst into their cafe: “Guys, I’ve made up my mind! Being in the same cafe for the rest of my life with my friends will be the best thing I can do with my life! Can I join you?”.

Now, a big problem arises: There are 2 versions of the Word documents (the honest one, and the one with Sal did not pay 5 dollars to Joe). But Pete does not know which version is the honest one. Joe, John and James say, their version is the correct one. Sal and Brian say the opposite. Each party is accusing the other party of lying.

Thanks to our assumption of the honest majority, Pete can figure out the altered version. This probably did not satisfy you (at least, it shouldn’t have), since there are only 6 people in here, and it is easy to manipulate the majority in this case. Imagine hundreds of thousands of people using this system worldwide. How can you accomplish convincing the majority to play along with your lie? Practically impossible. Still not satisfied? Good, our protocol will be much more secure than just trusting the majority.


There Is Another Very Big Problem In Here: Double-Spending

Let’s complicate the situation a bit. Pete is dead because his chair broke and he hit his head to the corner of the table. Reasonably, all the other 5 people are now scared. So they went home. Sal and Brian apologized to others and converted back to the honest ledger. Now, whenever someone will send money, he should broadcast that to everyone, for others to update their own ledger.

Pete

Sal is kind of too lazy to make his own coffee, and he buys them from Brian and Joe. But he is broke at the moment, have only 7 dollars, and can afford only 1 more coffee. His addiction to coffee and laziness surpasses his ethics. And instead of broadcasting, he does the following:

Effectively, Sal purchased 2 coffees for 7 dollars. In other words, he double-spent his money! And the majority was honest. Remember that blockchains have members from worldwide, and connection issues can happen. With the potential conflicting transactions, and connection issues, there is no efficient solution besides global ordering. If we can order the transactions globally somehow, Sal can’t double-spend (because one of his transaction will be issued before the other one, and his second transaction will be rejected due to insufficient balance).


It is not secure (yet)

It is obvious that our protocol is not safe at the moment. In the next article, by solving this double-spending problem, we will force Sal to get up and make his own coffee.

Next Article

II. Ordering