Cryptocurrency: What is bitcoin and how does it work ? -An overview

Farhan Ansari
Coinmonks
Published in
7 min readApr 17, 2018

--

(Image Source: Block Geeks)

Cryptocurrency is the buzzword today and people are rushing to understand this not so new technology which is expected to disrupt the financial sector in years to come. Let’s try to decipher it, in a part by part series starting this one. The questions we will try to answer in each part are:

What is bitcoin and how does it work? — An overview

Eating the cryptographic vegetables — Building blocks of Bitcoin
Why Mallory can’t tamper the ledger? Blockchains as a permanent ledger
How did Bob’s brother earn his money? Mining and creation of new bitcoins, transaction fees
The bitcoin network and distributed consensus
Security and Bitcoins — A discussion

What is Bitcoin? Wikipedia says:

“Bitcoin is a cryptocurrency and worldwide payment system”

It is trivial to conclude two things from this statement. That Bitcoin is a currency system based on cryptography, It can be used to perform payments worldwide, We will try and make sense of these two statements.

We are familiar with paper currency which is guaranteed by the Reserve Bank of India (and other central banks in other countries) which has a signature of the RBI governor saying:

I promise to pay the bearer the sum of ten rupees.

Currency (INR)

In the case of bitcoins, whose signature will it bear ? Who owns it ? Who will guarantee the currency ? And why do we need it when we already have rupees and dollars and Ngultrum(Currency)?

Bitcoin is a currency system run by a network of computers, guaranteed by the network.

Therefore we can say that either nobody owns it — in the sense that no single person or entity has a monopoly over it. Or we can say that the network collectively owns it.

Who is a part of that network? Technically, anyone can be. Yes, even you.

Whose signature will it bear ? Of whoever is paying in bitcoin.

Bitcoin Payments

How does this work ? To understand this, take a leap of faith and assume that Bitcoin has currency value. We will visit this question at the end of this blog.

For example, you are Bob and you have 5 bitcoins. You want to pay Alice 3 Bitcoins. So you announce to the network that you had received 5 bitcoins from Bob’s brother out of which you want to give 3 to Alice.

But how will the network know that it is you who announced and not Mallory who wants to impress Alice as much as you ? By verifying that the signature is that of Bob — who had earlier received the coins from Bob’s brother and not Mallory, who is just trying to spend Bob’s money.

How does the network verify the signature ? Does it already know Bob’s signature against which it can compare ? But if so, wouldn’t Mallory, who is very smart, forge Bob’s signature ?

No, the network does not need to know Bob’s signature but can still verify whether it is the actual Bob’s signature and not the forged signature from Mallory. How ? The answer lies in a cryptographic technique call digital signatures which we will discuss in the next part.

Okay fine. But how did Bob’s brother come into the picture? Because for you to own money, somebody must have given it to you. Or you may have worked hard to “earn” it. In this case, Bob’s brother had earned 12.5 bitcoins by working very hard and had given 5 coins to Bob whom he respects a lot. As to how Bob’s brother earned his 12.5 bitcoins, he earned it through a process called mining, which is another word for computational drudgery, and we will discuss that in the next part.

Now, what does the network do when you announce to it that you’re paying Alice 3 bitcoins from the 5 you have. It will do the following:

Check whether you have at least 3 bitcoins to spend — it will verify that the coins you’re spending were paid to you in an earlier transaction
Check if it is actually you who announced — it will verify the signature in your announcement
If the checks are successful, it will accept this transaction by adding it to a public ledger which can be seen by everyone on the network
So far I’ve been saying “the network” checks, verifies, adds etc. But how does a network — which technically anyone can join — do all this ?

In reality, it is just one node which does the verification and adds the transaction to the ledger. But how can we trust that node ? What if Mallory has an insider — his sister Mallory’s Sister in the network who will add the transaction to the ledger irrespective of what Mallory says. Or what if Mallory is himself in the network — given the tremendous power he wields.

The answer lies in the fact that Mallory does not get to cherry pick who his Auditor will be — i.e. who will get to verify his transaction. “The network” chooses randomly who will get to verify the transaction. Given that more than 50% of people in Bob Rajya are honest, it is unlikely that Mallory’s efforts will succeed.

Again how does “the network” choose? We will come back to this in part 3.

Hint: It is related to how Bob’s brother earned his money

Okay, the network accepted the transaction and put it in a public ledger. What if Mallory tries to tamper with the ledger later on and try to show that Bob’s brother had given the 5 bitcoins to him and not to Bob? Well, with the type of ledger that is used by bitcoin, this is impossible to do. How ?

In very layman terms, every transaction contains a part of the previous transaction in the ledger. So if you try to modify one transaction, you will have to modify the previous one also. But since the previous one contains a part of the one before it, that has to be modified as well. And since that one has a part of the transaction before it, the previous to it has to be modified. I hope you get where I’m getting at. To change one, you have to change all transactions from the beginning of time. And to do that is impossible even for Mallory with all his ten heads.

How this is accomplished technically, we will get to it in the next part when we eat the cryptographic vegetables.

The economics — how does bitcoin acquire value and become a currency?

Okay, now that we know how bitcoins can be used to make payments, we will see how it acquires value and become currency in the first place ? Let’s answer this in two parts — how something becomes a currency and how the currency acquires value.

To understand this, we need to understand how money works. Let’s look at traditional currency first.

It is an otherwise worthless piece of paper signed by the Reserve Bank of India governor guaranteeing it’s value. Given the guarantee, it’s value is measured by what we can buy with it. For example, if on a given day, 65 rupees is worth $1 means that you will need 65 rupees to buy a dollar bill.

Implicit in the government’s guarantee is that another person can’t spend the money you own or the same money cannot be spent twice — otherwise, money would lose it’s worth.

Traditional money works because people trust the government’s guarantee that paper money has value.

To summarise, Money should be hard to counterfeit, It should be trusted
It should be convenient to use — no one would a currency if using it was so difficult that it exceeds the value of the transaction you’re trying to do
Now, assume that there is a system which has all these features minus the government and paper bills. If the system is secure enough to be trusted, is cheaper to use than traditional money, would it be incentive enough for you to use it instead of/along with Rupee, Dollar or Ngultrum ?

Bitcoin has security features built into it to make it reasonably trustworthy. Therefore it has features to make it useful as a currency.

Let’s focus now it came to acquire the value it has acquired the value it has now — a whopping $7,750.22 at the time of writing this. As we discussed earlier, the value of money is determined by what you can buy with it. Or to flip it, what it takes to own it. What costs to own something is determined by demand and supply. The more the demand and lessen the supply, the more it costs you to buy it.

Now how does demand a currency increase ? In the hope that investors can get returns out of it. This “hope” can be called the trust that investors have in the currency that they are investing in.

To summarise, bitcoins have come to be trusted by many many people and has gained value in the process.

I hope by this point, you have some idea of how bitcoin works. In the next part, we will look at the building blocks of modern cryptography that makes bitcoin tick.

Here you can find Blockchain simple implementation: VCoin

If you like this post share it, Don’t forget to clap, and comment if you find it worth reading minutes. I hope my writes manage to strike a chord with you.

--

--

Farhan Ansari
Coinmonks

Happens to be Software Engineer, Tends to explore challenging things with cloud solutions.