ndax logo

Part 2: Bitcoin's Greatest Gift to the World: Solving the Byzantine Generals Problem

Mar 19, 2023
byNDAX Labs

What Is the Byzantine Generals Problem?

It is a thought experiment that illustrates the challenges of achieving consensus in a decentralized system.  The problem is named after the Byzantine Empire, which was beset by civil wars and invasions in the 6th century. In the thought experiment, there is a group of Byzantine generals who want to launch a coordinated attack against their enemy.

However, they’re separated by large distances and it’s the 6th century: they certainly don't have access to satellite communication. How can they be sure that all of their generals will launch the attack at the same time? It’s a bit of a dilemma for the generals, who need to communicate with each other and agree on a common plan.

Indeed if a single general is malicious or self-serving, he can simply ignore the plan and launch his attack whenever he wants. Or worse yet, not attack at all and wait for his ‘allies’ to get crushed by the enemy because this unscrupulous general will have withheld crucial reinforcements, guaranteeing a brutal loss for his colleague(s). Even if some generals are loyal, there is no way for them to know who is honest and who is malicious until the time of the attack/siege.

The challenge is to find a way for the loyal generals to come to a consensus while the traitorous ones are rooted out and prevented from disrupting the process.

This scenario is used as an analogy in a computer science problem related to distributed systems. It basically outlines the challenge of creating a network in which all participants can trust each other even when malicious actors compromise communication between them… Which brings us to Bitcoin’s greatest and most underrated gift to the world.

Bitcoin’s Greatest and Most Underrated Gift to the World

Bitcoin solves the Byzantine Generals Problem through its protocol based on game theory. Through Bitcoin’s blockchain (which uses what is known as ‘distributed ledger’ technology which records all transactions in a time-stamped chain, the Bitcoin protocol further introduces proof-of-work, which could also be described as ‘time-hashing’ (i.e. “This task was done at this time, what’s next? All agree? Ok, this is part of the blockchain. And this task was done at this time, what’s next?” And so on and so forth.)

Proof-of-work is a system that makes it expensive for an attacker to mount a 51% attack, which is when an attacker controls more than half of the network’s mining (or ‘Hash’ power). Proof-of-work makes it economically prohibitive (financially ruinous, not unlike ‘MAD’ in nuclear politics) for an attacker to mount a successful 51% attack.

But what does that have to do with the Byzantine Generals Problem?

The Byzantine Generals Problem illustrates the importance of trust in distributed systems. It’s also been used to show how game theory can be used to solve problems like this. Think Byzantine Generals problem meets Prisoner’s Dilemma: If a general defects and is alone to do so, and the remaining generals go on to win their campaign anyway–because most of them were loyal–who do you think they turn on next when this battle is over? Of course, they continue marching right up to the traitor’s gates and in the 500s, one would believe that heads would roll. Bitcoin’s pseudonymous daddy, Satoshi Nakamoto, was well aware of the problem and designed the Bitcoin protocol so that it would be extremely challenging for an attacker to carry out a successful double-spend attack.

In a double-spend attack, an attacker would try to spend the same coins twice. This would be equivalent to the attacker sending two conflicting messages to the generals: one telling them to attack and one telling them to wait for reinforcements.

If just one general followed the attacker’s first message, he would be defeated; but if both generals followed the second message, then they would win. The point here is that an attacker would need to convince a majority of the network miners (the equivalent of generals in this analogy) to accept their version of events for their attack to succeed.

However, because each miner is financially incentivized to follow the longest chain (the one with the most work), it would be very difficult for an attacker to convince a majority of miners to accept their version of events. For an attacker to succeed, they would need to control more than half of the total mining power (hence the term, “51% attack”).

Bitcoin miners validate transactions and add them to the blockchain. The miners are rewarded with Bitcoin for their work. Bitcoin uses game theory to incentivize miners to validate transactions honestly. If all miners validate transactions honestly, then the system works correctly, and if any miners try their hand at funny business, they get dinged with an expensive electricity bill and no Bitcoin to pay for it.

And if any miners try any funny business, they get punished by the network and hit with an expensive electricity bill with no Bitcoin to pay for it. This incentive system introduced by Bitcoin (and Satoshi–whomever they are–we see you) ensures that miners have an incentive to keep the network honest and that consensus can be reached even in the presence of malicious actors.

Disclaimer: This article is not intended to provide investment, legal, accounting, tax or any other advice and should not be relied on in that or any other regard. The information contained herein is for information purposes only and is not to be construed as an offer or solicitation for the sale or purchase of cryptocurrencies or otherwise.