This page looks best with JavaScript enabled

Bitcoin - Layman's Terms

 ·  ☕ 8 min read  ·  🤖 Kaung

Context

There are many posts on web about digital currencies and blockchain, but I haven’t found an article about fundamental concepts and proofs on how blockchain can achieve independent, decentralized, and sustainable systems (not just in finance). In this article, I will explain bitcoin, its concepts, underlying technology (blockchain), and mathematical proof in simple terms.

Bitcoin

Nowadays, there are hundreds of digital currencies or tokens out there, but the father of all is bitcoin. Its idea was proposed by a person named Satoshi Nakamoto in or around 2008. Despite his Japanese name, we don’t know the real identify of the person. And his paper was just floating around on the web. You can see the paper on bitcoin website1. In fact, most of my simplified explanation are based on it.

Cash vs. Electronic Cash

Our physical cash is in essence a bill of sale. We exchange it for item(s) or service(s). The sale happens then and there, and the bills can be used for other purposes by the receiver.

In electronic cash, there is a problem. Since the transaction is not physical, there is a chance of double-spending. How do we prevent that a payer doesn’t spend the same digital cash for some other purchase?

One way is to have a trusted third party verify the purchase - think of credit cards, PayPal, Apple Pay, etc. But this defeats the purpose of decentralized currency because we are relying on full faith and reputation of a third party or controller for validation.

And if we think a step higher, governments are the ultimate controllers of their own currencies. For example, the value of USD is ultimately guaranteed by the full faith of the US government. The value of a currency is directly dependent of its government - see the most devalued currencies2.

So really, what bitcoin was trying to solve is - how do we have a digital currency which is entirely decentralized - in a way 100% democratic? No third parties or governments - with ideal world of just users using it among themselves and the value determined by its users.

Solution

Public Ledger and Cryptographic Proof

In place of trust (or full faith) of a third party, we implement a public ledger and cryptographic proof.

A public ledger provides transparency. Anyone can see the transactions, i.e. coins can be traced.

As for proof of ownership, when a user buys something, he just transfers his coins by using the previous transaction and the identity (public key) of the seller and adding those to the end of the coin(s). The seller signs it with his private key to make the coins associated with him.

The question is how does the seller know if the coins have been already used by the buyer in some other transaction? For that, the seller can check the public ledger.

Here is the beauty and the trick, which make this whole thing work. The public ledger is held by multiple nodes (or participants) i.e. there are multiple identical copies of the transaction record. Therefore, before the seller signs the coins as his, he just needs to broadcast and check if those coins have been used from multiple nodes. If the majority of the nodes (or records) clear those coins, then it is safe for him to proceed with the transaction and add it to the record. The new record is then synced among participant nodes.

Blockchain and Its Properties

The record of transactions are stored in blocks that are chained together by some cryptographic means - hence the term “Blockchain”.

To provide an analogy, consider a box with one’s cash in it. The owner of the cash has the key to the box. To purchase something, he needs to open the box with his key and take out his cash. Here, the box has a special property. Whenever he takes out his cash, it changes its internal state and produces a unique key. That unique key is used to open another box, where the cash is stored for the next person who has his own key to associate it with. The new box can then be opened by the next person who receives the cash, and the same can be repeated again, creating a chain of boxes with cash moving in them.

This architecture solves a major problem and removes the need of a third party to manage the record. We just need those special “boxes” (blockchains), and the business can be done between two parties - no more thrid parties.

It also prevents the malicious users from manipulating the chain of records - recall that blockchain essentially is a public record of transactions. If they want to change a certain block of record, then they will have to make changes to all the records chained subsequent to that block. Note that the change causes the block to generate a new unique key, and it cannot be used to crack the immediate block. It is akin to a scenario where the manipulator must forge many keys just to open a box and many more keys for its chained boxes to change the records stored inside them - ultimately to keep them consistent and to his favour.

At the same time, new blocks of record are verified and chained by honest users as they purchase and do business. They don’t need to figure out the keys. It is like a very disadvantaged race for the malicious users. And it is not just one blockchain they need to overwrite. They have to overwrite more than 50% of the replica copies held by others (here we do assume that the “other” nodes are honest and side with the majority). Therefore, the hackers will not catch up to the correct blockchain.

Mathematical Proof and Scenarios

This can be proved mathematically by using a stochastic method called random walk. A quick explanation on random walk – picture a drunk man walking on a straight road. At every position on the road, he can either go left or right with 50/50 chance. Because of that equal probability of going in either direction, the drunk man will always be around his original position. He would never move far to the left or right of his starting position.

Applying the same concept – let’s consider a malicious hacker trying to overwrite a blockchain, i.e. change accounting records to his favor and make his coins reusable. At each block chain, let’s assume he has 50% chance of success in cracking it. He would then move on to another block with the same chance. At the end of the chain, users are going about their business and servers verifying and writing new blocks with 100% success – we can assume the chance at 100% because both payer and receiver have their private keys, whereas the hacker doesn’t.

A simple math calculation

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
'''
Let us assume that
Probability of success on block A
P(A) = 1/2

Probability of success on block B, if successul on A
Noting that each block provides the same level of difficulty
P(A|B) = P(A|A) = 1/2 * 1/2

Now, if the hacker is n blocks behind, we get
P(A...An) = (1/2)^n

Let's see the P for n = 5, 10, and 15
'''
>>> n = 5
>>> (1/2)**n
0.03125
>>> n=10
>>> (1/2)**n
0.0009765625
>>> n=15
>>> (1/2)**n
3.0517578125e-05

In other words, the hacker will always be behind the users and honest nodes. He must deal with cracking the blocks and even if and only if successful, he will always be some time behind them. It is akin to two cars going at different speeds, the slower car (the hacker) starting some distance behind the faster car (the blockchain).

Let’s consider another scenario that the blockchain doesn’t append new blocks for some reason for some time, like the faster car stopping and at idle. Can the hacker catch up and overwrite? The answer is yes possible, but there is another obstacle for him. The reason is - recall that there are multiple identical records of the same blockchain. The hacker not only needs to overwrite the blockchain, but also must hijack more that 50% of the servers, so that they can agree with his version of blockchain (and just in time). It is similar to a real life scenario where one must pay off (bribe) multiple officials to approve his version of accounting record. The cost associated is not worth it, the risk of failure too high, and it is not logical to pursue the hack.

Summary

In this article, I have explained how the concept of bitcoin came about, how its underlying blockchain concept and architecture eliminates third-party involvement, and how it keeps its network (or circle of users) secure from record mainpulation. And lastly, the mathematical proof using random walk model to explain why it is near impossible (or rather not worth it) to take over blockchains.

References:

Share on
Support Me

kaung
WRITTEN BY
Kaung
Software Engineer | Physicist