Cookie Settings
close

How Stellar solves the blockchain finality challenge

How Stellar solves the blockchain finality challenge

Beans App
Published:
Sep 26, 2022

Introduction

The world of blockchain and cryptocurrency once was a space desolate, new, and scary. Only a small group knew and understood what crypto was and how it had to be used. Times, however, have changed. Blockchain technology is slowly starting to go mainstream, and more and more people are interacting with it. It is starting to replace legacy systems that are inefficient and support economies with bad financial infrastructures, without any central authority having to step in. Now that these chains experience heavy usage, however, their underlying problems are starting to show. New challenges arise, and if not solved they could make or break the crypto scene at a whim's notice…

The problem with finality in blockchain

One of the problems cryptocurrencies are solving is the problem of payments. You send some BTC from country A to your friend in country B, where he can use that money. Using blockchain technology this can be done more efficiently, cheaper, and faster than any of the currently existing options. The concept behind these transactions is relatively simple, but a mass-adopted blockchain payment solution has yet to be created. This is partly due to slow transaction times, high fees, and bad user experience. But there is more. One of the reasons that is usually overlooked, is the concept of blockchain finality.

Transaction finality refers to the exact moment in time when an asset has been transferred from person A to B. At this moment, person B has legal certainty that he is the sole owner of the funds, stocks, house, or whatever other asset that is sent. Because legal certainty is so important in many instances, legal systems have devised mechanisms to determine the exact moment of finality.

However, determining the exact moment in time when an asset has transferred from person A to B is not so easy when it comes to blockchain transactions. Blockchains like Bitcoin and Ethereum make use of probabilistic finality. Probabilistic finality means that the probability that a transaction is reversed, decreases as more blocks are added to the blockchain. The more time has passed, the less likely your transaction will change and the more “final” it is.

Blockchain payments and finality

A consequence of a blockchain that uses probabilistic finality is that there is never an exact moment the transaction is final (except when specified in the law). Some countries handle non-final and final transactions in different legal ways, which might cause problems when a company goes bankrupt or disputes about transactions arise.

What will happen when a company has sent you money just before it went bankrupt? Is your probabilistically final transaction still valid? Some countries might have laws that state that your money belongs to the bankrupt estate since it’s not really final. As you can imagine such situations could end up in a legal nightmare, where everyone loses…

Issuing fiat and crypto

And maybe even worse; what happens when a chain experiences a fork and (if only for a moment) there are 2 versions of the same stablecoin in circulation? This means there are for example 2 USD tokens that have a claim on the same 1 dollar in cash.

When Bob wants to redeem his USD tokens for USD, he sends his USD tokens to the issuer. The issuer in return, would send the equivalent in cash. When a fork happens, an issuer might have redeemed Bob’s USDC for cash , when a new longer chain reverts the redemption transaction. Now Bob has the fiat money AND his USD tokens!

Adding a transaction to a forked chain inevitably gets reverted.

All of this leaves legacy blockchains in a vulnerable place. Although chances are very slim that the aforementioned will ever happen, we already have seen some instances of blocks being created before being removed again. Chains like Ethereum and Bitcoin will never be safe from these kinds of risks, which makes issuing fiat and tokenized assets on these chains riskier.

Note; read more about blockchain settlements and finality in this blog post from Naomi Oba.

Stellar

To solve these problems we chose to build on the stellar blockchain. The stellar blockchain, built by the Stellar Development Foundation, is completely focused on fiat-to-crypto optimization. The Stellar blockchain uses its own Stellar Consensus Protocol (SCP), which is designed around deterministic finality and already assures finality after 1 ledger update. Each validator in the network chooses a subset of other validators that it trusts, and a threshold of how many of the subsets have to agree before adding a block. When a validator then tries to add a block, it checks upon its own subset to see if adding the block doesn’t produce any conflicting outcomes. This way, there is no branching, almost instant finality, and no double-spend incidents on the Stellar network!

How does this benefit Beans?

Beans has chosen to build on stellar just because of the safety that the Stellar ledger and the consensus protocol provide. These features baked into stellar make it a secure and safe blockchain to develop on, especially when you are dealing with fiat on the blockchain. This environment that Stellar is creating gives Beans and issuers on the network the confidence to build, without being afraid to lose funds or worry about any of the problems legacy blockchains have to deal with.

In conclusion

Finality is a very important and difficult concept, which can make or break a blockchain. Legacy blockchains use probabilistic finality, meaning that issuers never have complete confidence that their transaction is final. Stellar solves this with a consensus mechanism that has deterministic finality. This creates an opportunity to build a blockchain designed around fiat optimization and standardization, resulting in an optimal user experience. Apps like Beans can use these features to build super friendly user experiences, all powered by a highly efficient blockchain like Stellar!