Blockchain is a technology that enables moving digital coins or assets from one individual to another individual when see in terms of cryptocurrency. Let’s go into the problem that blockchain attempts to solve.
Problem: “Money Transfer”
Assume if a Person A wants to move money or transfer money to a Person B let’s say from USA to Japan this is typically done using a third trusted party and it is typically works as follows.
First of all person A says I want to move some money to B so he orders third trusted party (e.g banks) to transfer money to B. Because it is trusted, that party identifies person B and the bank account in Japan and then move the money after taking some fee to the right account in Japan, this typically takes about three days or more. What Blockchain Technology is attempting to solve is first to do the transfer money without the Trusted Entity, Second to do it faster than three days actually immediately and third to do it cheaper than the fee that the third party collects so let’s dive into how blockchain addresses this money transfer problem in details?
The first principle that we are going to talk is a concept of the open ledger and I’m going to illustrate this concept using an example.
let’s say that we have a network of four persons that actually wants to move money from one another. Assume that at Genesis (at the moment of the inception of the network) Person A has $10 from the beginning, now let’s see the concept of the Open Ledger and how it is being implemented in Blockchain let’s say that Person A wants to move $5 to B – what is going to happen is that we are going to add a transaction “Person A move to B $5” and we are going to linked it in to the already existing transactions then let’s say that “Person B wants to move $3 to C” so we are going to do the same i.e. we are going to link another transaction into the ledger or chain that says “B moves to C $3” finally if you want to move $1 from Person C to D again we will do the same process “C move $1 to D ” and we link it to the ledger, So this is the concept of open ledger, it is essentially a chain of transaction and this is one of the reasons that this is called Blockchain – means this is a chain of transactions that is open and public to everyone, what it gives us is that everyone on the network can see
- Where the money is?
- How much money each one has in its account?
And everyone can decide whether a transaction is valid or not, for example if Person A attempts to move $15 to D, everyone on the network can immediately see that this is not a valid transaction because A started with $10 move out another $5 to B, A does not have $15 and this transaction will not be added to the open ledger, this transaction will not be part of the chain. (Highlighted with red arrow in the above data flow diagram)
Learn More: How to Build a Blockchain – Programming Guide
Now we can move to the second principle of Blockchain, look that we have a centralized place now, that manages the ledger but remember that Blockchain’s goal is to get rid of centralized place, so the second principle is a Distributed Ledger, which means Blockchain is going to trade the centralized one and distribute it across the nodes in the network which means Person D for example can have a copy of the ledger and can hold it in his node, Person A can do the same and have a copy of the ledger and anyone else that participate in this network can holds a chain of events that happens, now what we got is that the ledger is distributed and essentially we don’t need any centralized place that holds the ledger.
Synchronized Ledger – Mining
We removed third centralized trusted party however we created another problem, now when there are various copies of the ledger in the network we need to make sure that all these copies are synchronized and all the participants in the network sees the same copy of the ledger, the same version of the ledger and this leads to the third principle of Blockchain which is probably the most interesting one.
We are understood already that the ledger is open i.e. everyone can see the ledger, it is distributed across various nodes and now what we need to understand is how in this kind of distributed ledger nodes understand and synchronize a ledger across itself? We’re going to do that using an example.
Let’s say that “Person B wants to move $5 to D” B will publish and broadcast this intended transaction to the network. Everyone in the network will see immediately that B wants to move $5 to D, this is an unvalidated transaction (highlighted with red arrow in data flow diagram), it is not getting yet into the ledger, in order to get into the ledger we need to understand the concept of MINERS.
Miners are special nodes which can hold the ledger, in this case let’s say that C and A are Miners, they are going to do these things. Miners are going to compete among themselves – who will be the first to take this unvalidated transaction and be able to validate and put it into the ledger, the first miner that will do that will get a financial reward (Cryptocurrency).
Let’s try to understand what it means to win the competition? In order to be the first that is able to take the transaction and add it to the ledger a miner needs to do two things
- Validate the new transaction – this is easy because the ledger is open and you can immediately calculate whether B does have their funds in order to make the transfer.
- To find a special key that will enable this miner to take the previous transaction and lock the new transaction, in order to find this scheme the miner needs to invest computational power and time because this search of the key is random, the miner is repeatedly guessing new keys until it finds the first key that match this kind of a random puzzle.
The first one that will do that will get the financial reward.
Person C (Miner) was able to solve the puzzle and be able to take this transaction and added to its own ledger, what he is going to do now is going to publish the solution to the entire network to broadcast it to the entire network which means he would say here is a validated transaction and here is the lock, here is a key that enables everyone on the network, thus every one in the network will get the transaction and add to their ledger and look for another transaction to work on and hopefully to get the reward next time.
Blockchain is based on following basic principles.
- The ledger is open and public such that everyone can see and validate transactions.
- The ledger is distributed and essentially exists in many nodes on the network removes the dependency on third party
- The concept of miners who are special nodes in the network that their role is to validate transactions and adds into the ledger
- Economic incentive of miners essentially ensures that collectively they agree what is the official Ledger’s that should be used by everyone.
Read More: What is Decentralization in Blockchain?