When you ask people about Blockchain you wether hear “a distributed ledger”, “a trusted storage secured by advanced cryptography” or something similar that tells you everything and nothing. Besides, there are bitcoins, mining farms, ICOs and other creepy notions. In this 10 min read I try to explain those notions and relationship between them in a down-to-earth manner.
If you want to get in-depth knowledge on Blockchain, I can recommend these two papers on Bitcoin or Ethereum. If you want to understand the basic concepts — read this article.
A rough idea of Blockchain is first met in 1992 in paper by Haber and Stornetta where they talk about the approach to time-stamping digital documents. Time-stamping means certifying the date when the document was created or last modified.
Scientists used paper documents, such as lab journals, to sequentially record their work, and be able to prove that they were first to invent a breakthrough idea. Such journals contained no blank pages and were certified by a notary on a regular basis, to prove their validity. Transfering this concept into the digital world had 2 problems:
1. It was too easy to change the digital document without leaving a telltale (in comparison to forging a record in a paper journal);
2. There had to be a central entity in the game, such as notary, whom every player had to trust.
First, Haber and Stornetta assumed that there is some central entity that “signs” digital documents. They proposed to “chain” digital documents in the way that a digital signature of any document contained some bits of previously signed documents. This made it harder to insert a fake document into the chain as the order could be always traced-back. Finally, they eliminated the central entity, by simply letting other document owners in the system sign your document. One could choose the minimum amount of signatures needed based on his belief in how many members in the system could be potentially corrupted. This is how the main idea of Blockchain — “to preserve trust in untrusted environment” - was born.
The notion of modern Blockchain and its usage for Bitcoin was published in 2009 (or 2008?) in the paper of Satoshi Nakamoto. He suggested to keep account of digital money as records in data blocks connected in a chain — exactly as chained digital documents. This allowed any person in the world own a wallet with digital money and securely pay for goods and services without any kind of bank or third party involved.
So how does accounting in Blockchain work? Let me give you a very simple example. Imagine a group of 3 people sitting in one room and playing cards. They don’t trust each other, therefore each one keeps track of the score on a separate sheet of paper. Every hour they compare papers to see if the scores still match. If some papers don’t match, players vote, and the majority decides which score is correct. Everyone copies the correct score in his paper and the game continues.
Bob has secretly changed his score and was rejected by others.
Blockchain follows a similar concept only at scale. Everyone in the Blockchain network has the same file (the blockchain) stored on his computer (copied millions of times). New records are added to the blockchain in chunks called “blocks”. Before the new block is added the network members have to agree if they want to add the block or not. The approach to reaching an agreement is called “consensus algorithm” and can vary for different blockchain implementations. It can be anything from a democracy where the majority has to say “yes” to a dictatorship where one specific person has to say “yes”. Upon agreement, a new block is added to the chain and the chain is copied to each members computer. This block is immutable and will stay in the blockchain forever.
And you are thinking right — if you corrupt 51% of members in a democracy setting you will control the consensus algorithm and thus can hack the blockchain.
Bitcoin is the first implementation of Blockchain concept which immediately found application in the Darknet - the hidden part of the internet where illegal goods, such as drugs or weapons, are traded. Bitcoin was a perfect fit, as it allowed merchants to reliably keep account of their money and facilitated trade without a third party involved.
Nowadays, Bitcoin has perfect applications on the legal market and is used for multiple purposes, such as savings, trade, speculation or cross-border transfers.
4. Ethereum (ETH) and other coins
Initially, Bitcoin was used as a medium for exchanging illegal goods. So it had value as long as people a need to buy those goods. Any other coin (cryptocurrency) is no exception — it has value as long as society can use it for some purpose. So do all cryptocurrencies have a purpose?
Let’s take a look at Ethereum (ETH) — a cryptocurrency with smart contracts. Smart contract is an agreement between two parties encoded in a computer program that does some action after a particular event happens. You can conclude such contract on Ethereum blockchain. Here is an example of smart contract:
Alice and Bob agreed that if it snows on Christmas 2018 in Berlin at 9 am CET, Bob will posts “It snows” on his Twitter. They created a smart contract with the following algorithm:
1. On 25.12.2017 at 9 am CET fetch weather data for Berlin from Google Weather API;
2. Check if snow=yes;
3. If yes, post “It snows” on Bob’s Twitter account.
This contract is stored on Ethereum blockchain and will be executed no matter what happens. The agreement is transparent and there is no way to corrupt it or to withdraw from it. Running such contract will cost Alice and Bob a fraction of ETH coin — probably around one US Dollar as for December 2017.
ETH is the only currency that you can pay with for smart contracts. This means that the value of ETH coin is backed by people’s (or machine’s) need to conclude trustworthy, transparent and automated contracts. You can apply the same thinking to understand if other coins represent any value for you.
By the way, you can read more on smart contract prices here.
5. ICO (initial coin offering)
ICO is a way to raise funds for development of a new cryptocurrency, and also emit first coins.
For instance, Ethereum said: guys, we are developing a blockchain-based system that will allow you to run fully automated contracts. The only way you can pay for those contracts is ETH, and you can buy them now with 50% discount.
If a fully automated contract is something humanity will need in the future, then this ICO is a win-win for Ethereum inventors who received their financing, and for coin buyers who can now run their contracts for half of the price or resell their coins as they gain value. If the idea fails, well…that’s venture capitalism.
So how do you get coins after the initial coin offering has ended? First of all, you can simply buy them for fiat money at an exchange, such as cex.io. But you can be more romantic and “mine” the coins.
Remember the chain of blocks with transaction records that we talked about at the beginning? In the Bitcoin, some 400.000 transactions happen per day and someone has to write them down into blocks to keep the system running. So how do we find and motivate this someone to do all the writing? Well, bitcoin network automatically gives a fraction of a Bitcoin to anyone who adds a new block with transactions into the chain. This process is called “mining” and this is how the rest of Bitcoins are created.
But wait for a second, you say, then anyone can be writing transactions for bitcoin and getting infinitely rich? Wouldn’t this lead to inflation? Yes, it would, therefore the number of Bitcoins is limited to 21 million and mining each one gets incrementally more difficult. The difficulty is artificially added by a complex mathematical problem that you have to solve before you can put your “block” on the Blockchain. The complexity of this problem constantly grows keeping bitcoin emission under control. Oh, and by the way, only the one who solves the problem first can add the block.
As for December 2017, approximately 80% of Bitcoins have been mined. You can imagine that the mathematical problem you have to solve today is extremely complex and you can’t solve it with a normal computer anymore.
Here is what you have to do. Bitcoin wants you to keep running a one-way hash function F(…)=S on some inputs, until you get a string S that contains a certain amount of zeroes (set by Bitcoin based on amount of coins left) in the beginning, for instance, 0000000xxx.
Calculation hash function to get the necessary string
The inputs to function F are:
● All Transactions — that you plan to record into the block;
● Timestamp — current time;
● Reference to a previous block (remember signing digital documents);
● Random variable - a number that you can vary in order to receive different hash values every time.
And the function F is non-invertible, meaning that you can’t reconstruct the random variable by knowing the required amount zeros in the string S 00000xxxx. Therefore such problem can only be solved by brute force and can’t be computed by a regular computer in a reasonable time.
However, it can be computed with a supercomputer. These supercomputers usually consist of multiple GPUs (such as Nvidia GTX 1070) or ASICs which are connected together and solve a single purpose — picking up hashes as fast as possible.
A typical Bitcoin mining farm
Supercomputers are placed in separate buildings and therefore called farms. So the farms do nothing more than recording your transactions on Bitcoin or other Blockchain networks. You can also view them as a back-office of a bank. A secure, anonymous, distributed back-office.
8. Fraud or Not
Now you may ask what about thousands of existing and newly appearing cryptocurrencies and their ICOs. Are they good or are they fraud? Shall I invest?
There is a lot of speculation on the market — people see Bitcoin growth and wonder if they could still catch that train with a similar currency. I assume few invest in a coin with a deep understanding of the concept behind it. Which is fine if you are looking to selling the coin shortly after the price rises. If you are looking for a long-term investment, like with Bitcoin: buying it for few cents in 2009 and after 8 years selling it for 10.000 USD, then you should study the concept behind the coin and make a conscious decision. Here is an easy check for you:
● If you are investing short term — see if the team creating the coin can make enough hype around it to make the price rise. Be alert and prepare to sell. This is nothing more than speculation;
● If you are investing long term — ask your common sense if the concept behind the coin is valid and valuable, and if you think it is, then buy some coins. The value can be represented by smart contracts in Ethereum or Anonymity in ZCash.
No matter if you plan on getting rich with Bitcoins, I highly suggest you to play around: create a wallet, do some simple transactions, deploy a smart contract, maybe do some mining. This will help you to dig deeper into the topic and build your own opinion on what’s happening. Good luck!
And one last thing. If someone showed me a mining farm 15 years ago and asked what I thought it was doing, I would probably guess that it was discovering a drug against cancer to save human kind. And if they told me that it was doing nothing more than calculating million hashes per second, I would probably laugh… And what would you do?