Blockchain’s flavors of Finality.

It is not over until the blockchain says it is; sort of.

How would you feel if you sold your car & an hour later lost the money from the sale? You search for days, file reports & beg your friends for help; but alas nothing. As you spiral into financial hard times & begin to regret your actions you find out that the person who bought your car has your money & they are not obliged to give it back to you at all because there is no proof that the transaction ever happened…

Within the context of blockchain & cryptocurrency, there exists a notion known as finality. Finality is a quintessentially important property of any blockchain consensus mechanism; it is the degree of certainty that a transaction has settled & cannot be reversed.

Finality determines a multitude of industry-related nuances such as the rate of settlement for commercial activities. (the speed at which an exchange accredits a user’s deposit or a merchant can process a transaction for goods).

Whenever a transaction is conducted, it is announced to the network and placed into a mempool. The mempool is monitored by node operators that they see the transaction, validate it & propagate it to the rest of the node on the network. Once the transaction has been validated, it is packaged into a block and awaits being published to the network/chain. Here is where things start to get interesting. Once a transaction is published & can be publically inspected, it seems safe to assume that the transaction has been finalized; right?

Not quite.

After being published the block containing the transaction must then be registered by the global consensus mechanism of the blockchain network; if for any reason the network decided that the block was actually not valid or a malicious actor was able to “rewind” the chain’s activity, then the transaction gets reversed. (Put into context, if somebody deposits $1,000 worth of BTC {at the time worth 0.01} into an exchange & traded that BTC, but the transaction becomes reversed, the depositor will keep their $1,000 worth of traded goods & get their Bitcoin back; resulting in huge losses for the exchange that now has to cover those trades.}.

This then begs the question; when does a transaction become safe to consider finalized?

The answer to this question depends on the consensus system underpinning the blockchain upon which a transaction is being conducted.

Finality exists in 3 different variants — Absolute, Economic, & Probalistic.

Absolute Finality (instant)

Absolute Finality is the irreversibility of a transaction at the exact moment of the transaction taking place. It should come as no surprise that this flavor of finality is typically present in higher throughput blockchain mechanisms (such as pBFT).

Economic Finality

Economic finality is based on the notion that is financially unsound for a blockchain to be reversed. This type of finality is based on the assumption that any malicious activity will not take place because of costs being too high. This assumption exists in both Proof-Of-Work & Proof-Of-Stake consensus systems.

As an example we can take a $10,000 transaction.
- In PoW; if a malicous entity wanted to reorg their $10,000 spend on a blockchain such as ethereum, it would cost them roughly ($420,000 per hour) & that would by no means gurantee their transactions reversion (they would technically only have a 51% chance).
- In PoS; proof of stake system typically have a disincentive in place to deter miners from abusing their power & manipulating the chains. So if a network has 101 stakers that are staking $100,000 each the network security is $10,100,000; the network can handle up to a 33% subversion so the attacker would need to post up a minimum of ~$3,033,000 to attempt & reverse a $10,000 transaction (which should they be cought would be taken away from them — not economically smart to risk over 3,000,000m for 10,000k.)

Probabilistic Finality

Probabilistic finality is also known as the “longest/heaviest-chain-wins” logic. Finality here is established through the depth of a transaction. With each new block that is appended to the chain; the block containing the transaction in question is buried deeper into the chain & in turn, becomes more computationally intensive to reverse. Probabilistic Finality is perhaps the most popular version of blockchain finalities; It is the finality present in proof-of-work utxo/chain based open blockchain structures such as Bitcoin, Litecoin, & Monero.

Probabilistic Finality Visualization (BTC reference blocks)

But what is the point of having different types of finality?

From the perspective of a user, it would seem that rather obvious that instant finality is the most desirable form of finality. However, whenever inspecting things one step further, each version of finality brings its own set of tradeoffs.

A blockchain is a form of distributed ledger technology (DLT); & DLT’s are subject to what is known in computer science as CAP Theorem (Consistency, Availability, Partition Tolerance.) What the CAP theorem expresses is that in the event of a network partition, the distributed ledger can only maintain one of the two, either Consistency or Availability. If Consistency is chosen, then the network will stop. If Availability is chosen, then the network will allow for transactions to continue coming in (but they would be considered unreliable transactions).

Absolute Finality = Consistency
Probolistic Finality = Availability
Economic Finality = Both / Either.

Simply put, this means that systems of absolute finality are more prone to controls & suberversion by central entities; meanwhile systems of probobilistic finality are more resiliant & decentralized.

Thank you for reading
& May the blockchain be with you 🥂

Andrey Didovskiy logo
Subscribe to Andrey Didovskiy and never miss a post.