Here’s a piece that I took out from the previous post to further expand:
How can we reach consensus between parties that don’t necessarily know each other, definitively don’t trust each other and might very well be untrustworthy?
Let’s start with what we have today, a traditional transaction (A to B) usually relies on :
- several intermediaries beyond the scope of the transaction (A+B+ ?)
- several teams or entities within those intermediaries to re-conciliate among them the impacts of that transaction, everybody has their own version of events and need to ensure that this is updated post the transaction.
- several agreements between parties, (i.e. which in essence is people or entities trusting each other to fulfil a pre agreed obligation)
- which implies a whole bunch of monitoring on top of all the above to ensure that everybody is doing what they are supposed to do.
You understand where I am going with this, a trust network, even if “trust” is intuitive, is very expensive to enforce at scale and can be very inefficient and complex digitally.
In a Blockchain, A and B are part of the same network, filled by a lot of people like A and B (called nodes), which:
- are linked together
- that share a common database of what happens between them
- have agreed by joining on a common language and a given set of rules
Here’s a simplified version of what is going on between the transaction request and the transfer of funds in a public blockchain:
“A” simply broadcast a transaction request to the network with her unique fingerprint (using a technology called cryptography&digital signature). The network, more specifically a randomly selected node, validates the elements of the transaction request (is really A that makes the transaction? does she has enough money, does “B” exist, etc..). Funny enough, it turns out that this validation step, usually done by an intermediary bank, can be done by anyone as long as they are not “A” or “B” , not colluding with either and they are part of the same network.
Once validated, the transaction is included in a fixed size list of transactions, called block, before being added to the common/distributed database.
You may have already guessed, this database is nothing else than a sequence (or chain) of these blocks, hence the name blockchain.
Now comes the tricky part, before adding a new block to the chain, we need to ensure that we all agree on it because:
- we all own that database,
- we don’t necessarily know each other and
- don’t trust each other enough to make changes to it.
To solve this conundrum, the network announce a competition: the Blockchain Lottery.
The Blockchain Lottery
As every lottery we have a cost to take part, a probabilistic component and a price if we win.
The reward is usually the aggregate of the transaction fee within the block which is given to the first node that solves a specific quest. These transaction fee are what the initiator of the transaction is ready to give up to incentivise the network to include his/her transaction in the database, essentially the price is ready to pay for the network to work for him.
To win the lottery a node will need to solve a mathematical problem which has some specific features:
- a solution can be found only via trial and error (no closed form solution), which implies that every trial will require a bit of energy and computing power, which is the cost of the ticket.
- the complexity of the math problem, in this example the chances of finding the winning ticket per attempt, is tailored to the power network so that statistically every 10 minutes (for example) a solution/(winning ticket) is found.
Adding an economic cost and the probabilistic component is what makes this consensus algorithm secure (economic model of security), it essentially makes statistically “almost” impossible that corrupted nodes can take over the blockchain.
This is one of the key differences from the centralised model, rather than simply hoping that the parties we interact with behave honourably (like in the current system), here we come up with a trick that inherently build the desired properties into the system, in such a way that it will keep functioning with the guarantees that we expect, even if many of the actors involved are corrupt.
And the winner is…..
Once a solution is found, the winning node will then timestamp the solution (“converted” block), broadcast it to the network, so that everyone can try it and check if it is correct, if it is, there is no point to continue attempting to solve that problem anymore and everybody will move to the next lottery, once that happens, the reward is unlocked for the winning node, and the transaction part of the block is confirmed and B receives the money.