On this post I explain the technologies of blockchain and bitcoin in a simple way. If you have any doubts you can reach me on my twitter.
There are many different applications of blockchain and probably many more emerging soon. The main reason for using it is the idea that trust can be provided on an “universal” system without the need of a middleman simulate a lot of innovative creativity.
Blockchain is a program that allows people doing a single or a group of transactions in a secure and inspectable way, ensuring trustable system.
One of the things that make a blockchain so secure is because of its peer to peer network of computers that runs the program. In order to hack a transaction, it would need to hack every node from the network as the algorithm considers the most frequent solution on the network as the right one. Therefore the most nodes you have, the harder it is to hack the transaction. Talking about public blockchains with thousands of nodes, it would not be logical to hack it as financially speaking it is worthier to participate correctly on the network rather than hacking it.
It is inspectable because every transaction (shown as green block below) contains the values of input address and output address, showing where is it coming from and the destiny.
Blockchains are blocks containing the list of transactions that have been recorded on the program. The transactions go through a calculation of an algorithm and this process it is called "validation". This validation takes time, which depends on each blockchain, and every time it is finalized a new block is created, repeating the cycle afterwards.
Merkle tree is a very efficient way to take thousands of transactions and store it up in one spot. Its intention is to compress a lot of data, have a fingerprint and make sure that it’s basically commitment. They are a way to make the system tamperproof.
By using "hash" functions repeatedly, all the transactions of a block are summarized into the Merkle Root Hash. Hash functions are functions that take an input of any size and transforms in an output of the same size. They are used with cryptography methods to make the blockchain encrypted. In case of Bitcoin, it is used cryptography SHA-256.
Confusing right? Let's apply this system with a gossip:
The gossip would go from one person to the other. In this case it stopped from happening because someone told a lie.
But why would the gossip go from one person to the other (why blocks are created), how it is identified that a gossip told by someone is a lie (how calculations in a blockchain are considered wrong) and why the fake gossip is not told to anyone else (why the wrong transaction is not considered)? Find out below.
A new block is created whenever the algorithm solution of the current block is found. The ones that work to find the solution are called miners and they do that expecting a reward (Brazilian expression: free lunch doesn't exist). Miners are the validators of the network are the ones that create the system proof of scams. Once one of the miners finds the solution, other miners test the solution to check if it is true. If at least 51% of the miners say that the solution is incorrect, the solution is invalidated. When a transaction information is slightly modified, the result is a completely different Hash from the correct one. This way changing a transaction and gain the validation of the blockchain requires at least 51% of the network to change for the same value. Therefore the more miners you have in a network, the more reliable it is. If the solution is correct, the miner is rewarded with the coin of the blockchain and a new block is created.
Summarizing how it works
Take a look at this animated view of a blockchain and check if you can spot the steps below:
1. Every x period of time, transactions occur and are stored.
2. Miners start testing a set of characters that result in the solution expected by the algorithm.
3. Once a miner finds the solution, other miners test the solution to check if it is true.
4. If the solution is incorrect, the solution is invalidated.
5. If the solution is correct, the miner is rewarded and a new block is created. On the case of bitcoin, the algorithm requires to find a number with 18 zeros, taking into consideration all transactions made in the past, the time and the “hash” of previous block. Play it yourself: https://text.bargains/scratchpad/. How much time do you take to find a hash that starts with 0? How about 18 consecutive zeros?
One thing to keep in mind is that Blockchain is not a database where you want to publish thousands of data fields, otherwise it would become outrageously expensive. It can store the conversion of those data fields into a “secret code” – the hash – which reduces all of it to a small number of characters. That hash is useless on its own – because you cannot revert it to it’s original data. Why blockchain then? Because it creates an “indestructible” fingerprint of this data. It can be tested and tested again digitally. It is also “outside someone’s system”, so it can be used as universal trust. This is the fundamental value of blockchain. Providing trust without human beings involved. Blockchain won’t replace databases.
Generally, you store the hash on blockchain, not the thing. If it was about a video, the video would be stored “off chain”, not on blockchain. Not that it’s impossible, but it would be very expensive. Storing the 42 characters of the hash of a video would have a fee around US$1.42, while storing the video of 4 gigabytes itself would cost above $142 million (ETH price of June 23, 2021).
It is the mother of all Cryptocurrencies. Its history is a little bit long to tell here, so I will focus in its value.
Using blockchain technology, bitcoin contains an encrypted digital ledger with a decentralized network and a structure that makes future transactions depend on past transactions values. This makes digital content remains as most authentic and secure as possible. Bitcoin's algorithm also checks in how much time the miners are getting the answer of the equation and makes it more complex if it is too quick. The average time for mining Bitcoin is 10 minutes and whenever there is more computer power to solver the equation faster, the new equation is made harder by requiring one more "0" to be found.
National fiat currencies use the term "fiat” that means "trust” in Latin. As you saw on previous section, blockchain is a way to provide trust without the need of a middleman. Since Bitcoin uses blockchain, we could rapidly assume that Bitcoin should be considered a fiat currency. But I am not going to stop here. To understand why Bitcoin is becoming famous for commercial trades, let's understand what are the characteristics of a currency:
Bitcoin was born with two characteristics of a currency:
With these two characteristics, Bitcoin started bringing attention to it and early adopters started accepting it as an account unity. Nowadays this characteristic is very advanced, including countries adopting it as official national currency, but still not stable as bitcoins value floats a lot when compared to main fiat currencies around the world.
Bitcoin is a cryptocurrency that:
Making a parallel between bitcoin and gold:
Is Bitcoin the gold 2.0? I don't know, you tell me.