We have taken a huge leap, starting from the barter system to generating paper notes to transact for goods. The barter system, funnily enough, can be thought of as the closest cousin of Bitcoin, since both these forms of exchange include decentralized transactions without a centralized authority overseeing them to ensure they are atomic. Hence, over the past 5,000 years, we have taken a leap from decentralized systems to centralized systems, and back to decentralized systems again. Moreover, we were eventually able to make the centralized systems of paper currency electronic, encouraging the scaling up of businesses and increasing their customer base to the whole world via the internet.
It would be fair to make a direct comparison between blockchain and the barter system, given they share a common thread — they are both decentralized. If we were to think of the downsides of the barter system, there are many. It was highly localized; neither did each person have access to a customer base willing to exchange, say, “a horse for 10 bags of wheat”. However, in blockchain, we are exchanging cryptocurrencies with each other (can exchange multiple currencies with each other, or exchange currencies for money depending on the exchange rate), without a central entity overseeing this transaction. While the brains behind this, Satoshi Nakamoto, was able to build this wonderful “internet-supported” decentralized system, the real question is whether the benefits of a decentralized system outweigh the security vulnerabilities introduced by the coordination of multiple blockchain nodes — artificially resulting in an eventually consistent blockchain that does not include transactions that have already been executed, thus resulting in a transaction showing as complete even though the payer never lost money and the payee never received money (a.k.a. double spending).
The blockchain, after all, is a “Big Mathematical Beauty” (the only ‘Big Beautiful’ thing I’ll be talking about), and I say that having built a prototype myself. Before I dive into the specifics of my own project, I want to talk a little more about how this decentralized system works, and I am willing to confess the few errors I made during its architectural ideation.
The decentralized system relies on a few artifacts that make transactions irreversible, thus negating the possibility of a “half-done” transaction, which would be another variation of double spending. While rollbacks are impossible by design, vulnerabilities in the system can still produce the same damaging outcome — the point where things get interesting. I’ll come back to how that vulnerability can be combated later on, or in a follow-up article. But for now, I would like to focus on the upsides of decentralized systems (blockchain), mainly emphasizing how these rollbacks are prevented.
The chain of events can simply be explained as follows —
Every transaction has a set number of attributes, including a digital signature generated by the private key of the payer and the public key of the payee. It would be helpful to understand why this is so, instead of simply assuming it as a given. Each blockchain node stores a local “linked list” that need not be consistent with the version stored in other blockchain nodes. This is a common feature in distributed systems, where inconsistent data structures are stored across all nodes, eventually becoming consistent via protocols like the “gossip protocol”, as can be seen in Kafka and other big data tools. In fact, the whole of blockchain can be thought of as very similar to Kafka, including the broadcasting of events to multiple queues, the sequential ordering of those events, and the eventual consistency of data across all participating nodes. Much like Kafka’s commit log, the blockchain maintains an append-only record of transactions. While they share a lot of mechanical similarities, Kafka is not decentralized. While Kafka guarantees ordering via “Zookeeper”, the ordering in blockchain is contingent on the ordering of timestamps on the node that successfully solved the PoW puzzle and hosts the longest blockchain (this will become clearer in the next two scenarios).
(Please note that the linked paper suggests the upper threshold that enables a double-spending attack can be as low as 33 and a third percent, which is far below the 50% requirement for a classic attack. However, for ensuring intuitiveness and uniformity across the article, we will assume the lower threshold for double-spending to be 51%. We can dive deeper into this in the subsequent articles)
I will be talking more about my implementation of Satoshi Nakamoto’s paper in the next article, and as promised, I will be revealing the errors in my architectural ideation. I wanted to get a little creative by utilizing lambda functions (serverless architecture) to solve the PoW puzzles. Any guesses for why that would not work? Check out my next article if you’re still curious — or just ask Chat haha.
Funnily enough, the 51% attack could also be realized in the barter system, which only brings these two systems closer in commonality than one might otherwise assume. If I were to send a pigeon to a faraway land with a small chit stating that I am willing to ship 12 bags of grain in exchange for 7 cows, but never ship those commodities in the first place, while the 7 cows make their way to me, would that not be double-spending in its most ancient form?
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
References
Blockchain and Its Commitment Issues was originally published in Coinmonks on Medium, where people are continuing the conversation by highlighting and responding to this story.


