Storing transactions in a distributed ledger
A beer, please!
Our friends at The Blockchain Bar just introduced their own bar tokens. But how will they manage them?
Carol: “I don’t want to handle my tokens all the time for each drink. I’m used to paying when I leave the bar.”
Oscar has an idea: “Easy! Everyone remembers how many drinks they had. At the end, they give away the right amount of tokens.”
Bob is sceptical: “And what if someone ‘forgets’ a beer or two?”
Again, Alice has the solution: “We all keep a list of all drink orders. If you want a beer, you shout ‘one beer’ and everybody takes a note.” When someone leaves the bar, our friends just have to count the number of beers since the last visit and collect the respective amount of tokens. The best thing: You cannot game the system by “forgetting” drinks, because many others have the correct list and would find out.
Bitcoin works very similar: If someone wants to send money, they just inform other computers in the network about whom to send what amount, and the computers all record the transaction. These records are called “distributed ledger”.
Distributed ledgers create trust
In some parts of Germany, it is normal that everyone gets their little paper beer mat when they enter a bar. The barkeeper puts little symbols on the beer mat every time he serves a new drink to a guest. When a guest wants to leave the bar, the barkeeper adds all related prices together and the guest can pay.
Our friends at The Blockchain Bar could think of something similar. Everyone could take a beer mat when he enters the bar and then record each beer on the mat.
But what if they drink two beers, get a new mat, drink another two, and when they leave they only pay for the two beers on the second mat and forget about the other two? So this solution would probably not work.
Our friends at The Blockchain Bar agree, that according to Blockruption’s Blockchain Bar Protocol everyone getting a new beer has to shout his ‘order’ to the crowd. Then, everyone records this new beer on their own copy of a list with all orders.
There are as many copies of the drinking list as there are guests at the bar. They should all be identical.
And when somebody wants to leave, he takes the list, calculates the outstanding amount since his last visit, and puts the right amount of tokens into the token box at the bar. All others check their lists if the right amount of tokens was paid and then update their lists with the token payment.
It is nearly impossible to cheat in this system. It is impossible to ‘lose’ or fake your own copy of the drinking list in your own or someone else’s favour, because there will always be many more correct lists around and the group will request the amount of tokens that you owe according to a majority of the lists.
Of course, you could try to bribe or collude with a majority of other guests and fake the list collectively. But this will be very difficult when there are many guests at the bar. Further, a collusion of fraudulent guests will never be sustainable as it will ultimately destroy the bar.
Bitcoin works exactly the same way. Every computer on the network keeps a copy of the list of transactions.
As soon as a node changes entries on the list or tries to delete past transactions, everyone else will notice the changes and will reject transactions based on the fraudulent node’s version of the list. The network gets safer with an increasing number of independent nodes.
We can apply the same principle not only to financial transactions on the Bitcoin blockchain or to beers in The Blockchain Bar. Any transaction can be recorded in the same way on a shared list of which every stakeholder keeps a copy: house sales, birth of children, apartment lease, marriage, containers moving from seaport to seaport, etc.
This wide range of applications makes blockchain technology so powerful and disruptive.
Shared lists in the style of Bitcoin can be useful in any situation where a collective wants to keep a shared, immutable record of transactions.
In the crypto world we call that kind of list a Distributed Ledger. And the family of concepts using such lists are called Distributed Ledger Technologies (DLT). Actually, blockchains are just a subset of DLTs. But, increasingly, people and the media seem to be using the term ‘blockchain’ when referring to DLTs in general.