Introduction to Stellar Network and Stellar Lumens XLM. Part 3

Introduction to Byzantine Agreement Protocol

Jed McCaleb, the co-creator of Ripple and Stellar, has been able to achieve unprecedented success with his projects in part because the current global financial infrastructure is a mess of fragmented systems that often can’t communicate with each other. One of the reasons for it is different compliance systems and legal systems that financial institutions have to deal with. For example, a bank in the United States operates according to the laws of the US and complies with US financial regulations. The laws and regulations for a bank, say, in China, are completely different.

These differences are also one of the most important reasons as to why banks can’t adopt cryptocurrencies such as Bitcoin and Ether.

Both on the Bitcoin and the Ethereum network, any entity, including an anonymous entity, can become a miner and start participating in the creation of blocks on the blockchain.

Banks all over the world operate in strict regulatory environments and for insurance and compliance reasons they can only deal with verified third parties. They can’t transact in a currency that has no party to be liable for what is happening with the currency.

These facts are also the reasons why Ripple token is one of the largest cryptocurrencies by market capitalization.

Having co-founded Ripple, Jed McCaleb knows from his own experience that the friction between different financial systems, and traditional institutions and cryptocurrencies has been a major roadblock on the path of growth of financial services, resulting in billions of people all over the world being financially underserved.

The Stellar Network solves the issue of trust for financial institutions by using federated Byzantine Agreement to reach consensus on the network.


Introduction to Byzantine Agreement

In computer science and other technology-related disciplines, Byzantine Agreement is the way for members of a network to reach agreement in a way that allows the network withstand complex failures and new attacks.

The factor that makes the failures complex is that there may be no way for the network to determine what exactly is happening to the misbehaving parts of the system.

Also, such failing components of the system may send different error messages to different members of the system. For example, member A may think that the problem with component C has to do with power shortage and member B may thing that component C is experiencing hardware issue.

The problem is complicated not only because there may be insufficient data about malfunctioning elements of the system but also because members of the system need a way to agree with each other when they may be getting conflicting information.

The name of the agreement comes from a 1982 paper by Robert Shostak and Marshall Pease, in which they described the issue and outlined their approach to finding solutions to the issue. The paper was called “The Byzantine Generals Problem.”

In the paper, Shostak and Pease pointed out that the problem they were tackling was not new. It was the same issue that commanding generals of an army have to deal with when they are getting inconsistent data from messengers, traitors and the battlefield. The generals have incomplete information, yet they need to be able to reach consensus and make a decision with the information they have.

Shostak and Pease show that the Byzantine Generals Problem has a solution if over 2/3 of the generals are loyal to their command.

Here’s an example of how this works: let’s say there are three generals and two out of three are loyal. If one general gets confused with erroneous information or becomes a traitor, two loyal generals will still be in agreement. However, if two out of three generals get confused, then there will be no way for the only loyal general to override the decisions of two confused generals. The same principle applies if the number of generals is greater than three. The total number of loyal generals needs to stay under 2/3 or 66.6%.

Byzantine Agreement has several advantages over other consensus algorithms, such as proof of stake and proof of work.

The biggest disadvantage of proof of work that the Bitcoin network uses is that it wastes a lot of energy. According to figures from Morgan Stanley, it takes more energy to mine one Bitcoin than the average American household uses in two years.

Another disadvantage of proof of work is network latency. On the Bitcoin network, it may take an hour or even more for a transaction to receive all the confirmations that it needs to be deemed valid by the network. Finally, the Bitcoin network can fork when a large enough group of users decides that it wants to take the network in a different direction.

With proof of stake, parties make decisions based on the collateral that they have. When a network runs based on a proof of stake algorithm, it may be vulnerable to “nothing at stake” attacks, during which parties that have previously owned a stake and then spent it try to rewrite history as if they still have stake on the network. To prevent such attacks, most networks that use proof of stake algorithms essentially combine proof of stake with proof of work, but scale down the required amount of work in proof of work accordingly to the stake that a party owns. Another way to protect a network from “nothing at stake” attacks is to delay the refund of the stake long enough for the network to create some kind of irreversible checkpoint.

The first advantage of Byzantine Agreement over proof of stake and proof of work is that a network can reach consensus without latency, quickly and efficiently. The second advantage is that trust on Byzantine Agreement networks is disconnected from collateral ownership. For financial networks this means that non-profits could help keep banks and other large financial institutions honest because the financial advantages of the financial institutions do not matter.

In real life, banks can influence regulations by lobbying politicians and making donations to all kinds of campaigns and causes, but on a Byzantine Agreement decentralized network such actions won’t be nearly as much effective because there is no central authority that makes the decisions.