Finality is the guarantee that past transactions can never change.
In blockchain systems today, transactions are considered immutable. But, most blockchain systems only offer probabilistic transaction finality — that transactions are not immediately final, but become so eventually.
Consequently, it is recommended that one wait for up to 6 confirmations when transacting on the Bitcoin blockchain and 20–25 confirmations on the Ethereum blockchain to prevent a double-spend attack. Therefore, when transacting large amounts, it is better to use higher confirmation numbers, because the higher the number of confirmations the stronger the transaction finality.
Another crucial metric that is often overlooked is the blockchain time to finality — this is what guarantees that past or recent transactions will not change.
The table below shows different blockchains and their average time to finality.
Why is Finality so Important?
Finality measures how long one has to wait to be given a reasonable guarantee the transaction written in blockchain is irreversible, or in other words, will not be orphaned. This is a significant property for a business, because waiting an hour on a blockchain network can have significant repercussions for businesses.
Most of the public blockchain use lottery based algorithms to select a node to propose a new block. This scales well as minimal information is exchanged over a network to achieve consensus, but leads to chain forks in the network and therefore longer time to finality.
Finality in Proof of Work
Most PoW blockchain systems have a property called Longest chain of work, which helps determine consensus.
Let’s discuss the longest chain of work and how it helps consensus.
When miners mine a block, they are always looking to add a block to the longest chain. However, it’s entirely possible at any moment in time that there exists more than one chain.
A chain can split into two different forks when two different miners mine a block at the same time. At this moment the active main chain has split into two different forks and it’s quite difficult to determine which fork is the valid chain.
In this scenario, both forks will continue to validate blocks and add new blocks. Once one of the chains validates a block before the other chain completes it becomes the longest chain. The longest chain is the one with the longest most valid blocks attached.
The longest chain becomes officially the accepted chain and the transactions mined on the shorter chain are rejected. However, it’s possible the transactions rejected on the shorter chain have been included in other blocks on the longest chain.
Example of Attacks that can affect PoW Finality
Finality in Proof of Stake
Different PoS based blockchains have different designs for attaining finality. There are multiple implementations of PoS such delegated proof of stake, proof of authority etc. Attaining finality in PoS systems is a major discussion in today PoS blockchain based systems.
For example, Nxt protocol only allows reorganising the last 720 blocks which means that the transactions in ( current_block_height - 720 ) blocks before can be said to be “Final” although transactions with 10 confirmations can be said to be reliable. But still there are still some issues with this design.
Another example is Casper FFG, one of Ethereum implementation of PoS will achieve “Finality” by introducing the notion of “validators”, in addition to miners. The validators are responsible for confirming the blockchain at key checkpoints — approximately every 100 blocks. At these checkpoints, once 2/3 of the validators confirm a particular block then it becomes finalized. Once finalized, it will no longer be possible to change any of the blocks before the checkpoint. These checkpoints guarantee that history can never be changed on the blocks proceeding the checkpoint.
Example of Attacks that can affect PoS Finality
Achieving fast and secure finality is still quite an active area of research for blockchain systems. For example, Ethereum is moving to a hybrid PoW and PoS blockchain design that aids faster blockchain time to finality. The faster the time to finality the better.