Blockchain technology is changing the way we do business and store information. It is changing how traditional centralized systems work by creating a decentralized, unchangeable, and safe place for digital transactions. One key feature that makes blockchain stand out from other technologies is the concept of finality.
Finality, in the context of blockchain, refers to the irreversibility once a transaction is confirmed and added to the blockchain network. At that point, the transaction is deemed final and can no longer be changed. Practically though, there are remote chances of the transaction getting reversed depending on the blockchain network which has both pros and cons. Also, keep in mind that finality and latency work hand in hand in blockchains but they are not the same. Latency is the total turnaround time between submitting a valid transaction to the network and for the network to process/confirm the transaction. We have a separate blog for you on blockchain latency here.
In this article, we will analyze the concept of what is finality in blockchain and how Shardeum measures up in this crucial metric? We will also look at the different types of finality with examples. Finality is the cornerstone of consensus algorithms that ensure the integrity of the blockchain network and prevent malicious attacks such as double-spending and tampering with the transaction history.
Finality in Blockchain vs Finality in Centralized Systems
Once the transaction is recorded on a blockchain, it becomes part of the distributed ledger maintained by a network of nodes, which collectively verify and validate the transaction. In a decentralized blockchain network, finality is achieved through consensus algorithms, which allow network participants or validators to agree on the validity of a transaction with a need for an intermediary. Finality in blockchain ensures that the transactions are final and cannot be tampered with, which is critical for creating a secure and transparent record-keeping system. It also allows blockchain networks to begin the settlement process quickly leaving slender room for manipulations or bot attacks.
In traditional centralized systems, finality is achieved through a trusted third-party intermediary, such as a bank, which finalizes the transactions but is not completely tamper-proof. Finality in centralized institutions is thus not immediate or absolute and brings a certain amount of uncertainty. Centralized systems, further, lack transparency and are vulnerable to delayed or failed settlements due to the involvement of multiple third parties and traditional world order.
What are the Types of Finality?
- Probabilistic Finality
- Absolute Finality
- Immediate Finality
- Economic Finality
Now that we know what is finality in blockchain, let’s look at types of finality. Blockchain finality can be classified into different types based on the level of certainty and irreversibility achieved. The four main types of finality in blockchain are probabilistic finality, absolute finality, immediate finality, and economic finality.
1. Probabilistic Finality
Probabilistic finality is one of the oldest types of finality in blockchain. It is achieved when the probability of a transaction being reversed becomes negligible after a certain number of verifications/confirmations. In a proof-of-work (PoW) blockchain network like Bitcoin, probabilistic finality is achieved when a transaction is included in a block mined and added to the longest chain. As more blocks are added to the chain, the transaction’s reversal probability decreases exponentially. However, there is still a very small chance that a chain reorganization could occur, potentially reversing the transaction.
Probabilistic finality in blockchain is also used in proof-of-stake (PoS) and delegated proof-of-stake (DPoS) blockchain networks, where validators stake their tokens as collateral to secure the network and confirm transactions. The higher the number of staked tokens, the higher the level of security and finality achieved.
2. Absolute Finality
Absolute finality is next on our list, which in theory, provides complete and irreversible confirmation of a transaction. In an absolute finality system, once a transaction is recorded on the blockchain, it is considered permanent and cannot be reversed or tampered with.
Some blockchain networks, such as Ripple and Stellar, use consensus algorithms that achieve absolute finality through a process known as federated consensus. A group of trusted validators is responsible for confirming transactions and maintaining the network in a federated consensus system. Once a validator has confirmed a transaction, it is considered final and cannot be reversed. There are more decentralized networks like Cosmos and Algorand that use consensus algorithms like PBFT and PPoS which is said to help them achieve absolute finality.
Absolute finality in blockchain provides a high level of certainty for transactions while maintaining high security but typically requires high trust in the validators who confirm the transactions.
3. Immediate Finality
Immediate finality or instant finality is a more recently developed phrase, particularly by Shardeum. It is often confused with absolute finality. Immediate finality, in reality, is something that is extremely hard to achieve and would require transformational iterations in the way typical blockchains perform consensus and processes the transactions.
Achieving absolute finality in a public blockchain, at times, require sufficient confirmation by a certain number of subsequent blocks to ensure the transaction’s irreversibility. In other cases, a randomly selected validator on a blockchain network proposes a new block and broadcasts it before other participants validate the block in each round of consensus followed by a final round of consensus. While BFT and other recent consensus algorithms can offer faster finality compared to say PoW consensus, they still have a relatively high latency period due to the need for multiple rounds of communication and validation when compared to Shardeum.
On Shardeum, consensus will be done at the transaction level instead of the block level and transactions will be processed parallelly through dynamic state sharding while retaining atomic and cross-shard composability. Depending on the load in the network, auto-scaling will enable it to expand or shrink the number of shards instantly by making use of standby nodes. Processed transactions are eventually grouped together and passed onto archive nodes. Shardeum further makes use of EIP-2930 and automates the access list for multicall contracts. As a result, the network finality with be instant with a latency of just a few seconds. Immediate finality in blockchain, especially Shardeum, provides the highest level of certainty and security.
4. Economic Finality
Economic finality is the third one on our list where finality is achieved through the network’s economic incentives. In a blockchain network that uses economic finality, transactions are confirmed based on the cost of reversing them.
For example, in a PoW blockchain network, an attacker must spend significant resources to reverse a transaction, making it economically infeasible. As a result, economic finality in blockchain provides high security and certainty. However, it is not completely foolproof, as there is still a small chance that an attacker with enough resources could potentially reverse a transaction.
What are the Examples of Finality in Proof-of-Stake Networks?
Shardeum employs Proof of Quorum (PoQ) and Proof of Stake (PoS) consensus algorithms to process transactions on the network on FCFS basis. PoQ enables trustless and leaderless collection of votes after validations and subsequent consensus are reached on transactions among the relevant group of participating validators within shards. PoS will ensure validators stake a minimum amount of network coin to participate in the consensus process.
The consensus algorithm on the network will also enable the auto-rotation of validator and standby nodes randomly to maximize security. Through transaction level consensus and parallelized processing (dynamic state sharding will allow the validators to be assigned dynamic address spaces across multiple shards with significant overlap so transactions that affect these shards are processed parallely), Shardeum will scale linearly with atomic and cross shard composability. The network finality will be instant with a latency of just a few seconds. Yes, that means, the time taken between a user sending a transaction and the network confirming the transaction will be a matter of few seconds with 0% chance of reversibility after the confirmation. It also means that Shardeum will achieve high fairness by preventing MEV on the blockchain.
2. Casper FFG
Casper FFG (Friendly Finality Gadget) is a consensus algorithm developed by Ethereum as an upgrade to their Proof-of-Work (PoW) consensus mechanism. It combines PoW and Proof-of-Stake (PoS) to achieve finality in the Ethereum network. Casper FFG introduces the concept of “validators” who stake their ether as collateral to secure the network and confirm transactions. Once Casper FFG finalizes a block, it is considered irreversible, providing absolute transaction finality.
Tendermint is a consensus algorithm used in the Tendermint Core blockchain platform. It is a Byzantine Fault Tolerant (BFT) PoS consensus algorithm that achieves finality through a deterministic process. Tendermint uses a set of validators who take turns proposing blocks and validating transactions. Once a block is proposed and most validators agree, it is considered finalized, providing absolute transaction finality.
Algorand is a PoS blockchain platform that uses a consensus algorithm called Pure PoS. Algorand achieves finality through an “unworkable block proposal,” where most stakeholders propose and agree upon a new block online. Once a block is agreed upon, it is considered irreversible, providing absolute transaction finality.
Dfinity is a PoS blockchain platform that uses a consensus algorithm called Threshold Relay. Dfinity achieves finality through a multi-round process where blocks are proposed and validated by a group of “heroes” randomly selected from a pool of validators. Once the heroes agree upon a block, it is finalized, providing absolute transaction finality.
Thunderella is a PoS consensus algorithm designed for interoperability in blockchain networks. It uses a two-layer approach where a main PoS chain interacts with a “sidechain” to achieve finality. Once a transaction is confirmed on the main PoS chain and the sidechain, it is considered finalized, providing absolute transactionality.
7. Ouroboros Genesis
Ouroboros Genesis is a PoS consensus algorithm used in the Cardano blockchain platform. It achieves finality by combining a main PoS chain and “epoch boundaries” where validators propose and validate blocks. Once a block is confirmed at an epoch boundary, it is considered finalized, providing absolute transaction finality.
These are examples of the different PoS consensus algorithms used in various blockchain networks and protocols to achieve finality. Each algorithm has its unique approach to attaining finality, providing different levels of security and certainty to transactions.
What Types of Attacks Could Impact Finality in Blockchain Networks?
Although consensus algorithms and network protocols used in blockchain networks are largely effective, they are marginally vulnerable to a few attacks that could impact finality. Some of the most common types of attacks are:
- 51% attack
- Selfish mining
- DOS attacks
- Shard attacks/Cross-shard attacks
- Timejacking attacks
- Nothing-at-stake attacks
1. 51% Attack
A 51% attack (a majority attack) happens when a single entity or group regulates more than 50% of the network’s hash rate. This allows the attacker to control the network and prevent other miners from validating transactions. In such a scenario, the attacker could reorganize the blockchain and reverse previously confirmed transactions, undermining finality in blockchain.
2. Selfish Mining
Selfish mining is an attack where a miner or group of miners selectively reveal blocks to the network to gain an advantage over other miners. The attacker withholds valid blocks and only reveals them when they have mined additional blocks, which gives them an unfair advantage over other miners. This can lead to different miners having different versions of the blockchain, leading to a fork in the chain and undermining finality.
3. DOS Attacks
Here, an attacker overwhelms a particular shard on a sharded chain with a high volume of malicious transactions or requests, leading to a denial of service for legitimate users of that shard. Proof of Stake consensus, rate limiting, maximizing decentralization, horizontal scalability, randomizing, and auto-rotating validators are some of the ways DOS attacks can be prevented.
4. Shard Attacks/Cross-shard Attacks
In this case, an attacker gains control over a significant number of shards or exploits the vulnerabilities in the communication between different shards allowing them to manipulate transactions or disrupt the consensus process within those shards. Leaderless consensus, appropriate reputation/consensus mechanisms, gossip protocols, auto-rotating validators after every epoch cycle, and maximizing decentralization are some of the ways that can help prevent shard attacks.
5. Timejacking Attacks
Timejacking attacks manipulate the timestamps of blocks to either slow down or speed up the blockchain’s progress. By doing so, attackers can disrupt the finality and consensus mechanisms of the network. Networks with low fairness are particularly vulnerable to these attacks.
6. Nothing-at-stake Attacks
In a nothing-at-stake attack, validators or miners intentionally create multiple forks or conflicting blocks without incurring any cost. This undermines the finality of transactions as consensus cannot be reached on a single version of the blockchain.
Finality in blockchain refers to the irreversibility of confirmed transactions. Different types of finality, such as probabilistic, absolute, immediate, and economic finality are achieved through various consensus algorithms and protocols used in blockchain networks. Proof-of-Stake networks have emerged as an alternative to Proof-of-Work networks, with faster finality through staking mechanisms. With the introduction of Shardeum and its PoQ + PoS consensus algorithm, a blockchain network will finally have instant finality and latency for the first time ever.
Frequently Asked Questions (FAQs)
1. What is Transaction Finality?
Transaction finality in blockchain refers to the assurance that once a transaction has been approved and included in a block, it cannot be reversed or altered. Finality is crucial in ensuring the immutability and trustworthiness of the blockchain.
2. What is the Finality on Shardeum?
Shardeum’s finality will be immediate/instant through its ground breaking technology that introduces dynamic state sharding, auto-scaling, auto-rotation, unique consensus algorithm, transaction level consensus, parallel processing of transactions, automated EIP 2930 access list. Together, they help the network to scale linearly with immediate finality.
3. What is Consensus Vs Finality?
Consensus refers to the process by which a network of nodes (or validators) in a blockchain system agrees on the validity of transactions and the order in which they are added to the blockchain. Finality, on the other hand, refers to the irreversibility of confirmed transactions. While consensus ensures that transactions are validated, finality ensures that they cannot be reversed or altered.
Edits: Latency/Finality time is updated for clarity and accuracy on 16th Sept 2023.
Layer 1 Blockchain | Best Decentralized Exchanges | Best Crypto Youtube Channels | Best P2P Crypto Exchanges | Bloc`kchain Beyond Crypto | CBDC Efforts Worldwide | Ordinals NFTs | Ethereum Shanghai Upgrade | Best Blockchain Explorers | Best Crypto Faucet | Blockchain Proof of Work Vs Proof of Stake | What is Phishing and How to Prevent it | Blockchain Layers Explained | Cryptocurrency Liquidity Provider | EVM Wallet Address | Ethereum That Are Compatible With The EVM | Advantages and Disadvantages of Decentralization | Cryptocurrency Career Opportunities | Decentralized Identifiers | Major Components of Blockchain | What is a Flash Loan Attack | What is Defi 2.0 | Top Crypto Influencers | Blockchain Node Providers