Time to Finality

What is time to finality?

Finality is the point at which a transaction on a blockchain becomes irreversible and permanently recorded. But before we proceed, it’s important to have a basic understanding of how a blockchain works.

At its core, a blockchain is simply a database that contains transactions. When a transaction is submitted to a blockchain, it’s not added directly. Rather, it’s bundled into a “block” alongside other transactions and then incorporated into the database. As such, a blockchain is a sequential chain of blocks that contain transactions, hence its name.

Most importantly, a blockchain is decentralized, which means it doesn’t run on a single server. Instead, blockchain exists simultaneously on many computers worldwide that run software to communicate with each other and agree on the content of the database. (On Fantom, these computers are called validators.)

These computers bundle transactions into blocks and add them to the blockchain at frequent intervals: every ~10 minutes for Bitcoin, every ~12 seconds for Ethereum, and every ~0.4 seconds for the Sonic closed testnet.

However, once a block is added to the blockchain, it doesn’t mean the transactions contained within are instantly final and permanent. In most blockchains, a single computer is usually picked to create and add the next block to the blockchain. Other computers in the system then receive this block and validate the transactions within it to ensure their validity.

However, due to the design of most blockchains, there can be occasions when two computers are simultaneously chosen to create a block. In such a scenario, how does the rest of the system know which block to follow? Well, they must wait until the next computer is chosen to create the next block, and the previous block used by this computer is accepted as the legitimate one, while the alternative block is disregarded.

This is called the longest chain rule, as every computer in the system follows the blockchain version with the most blocks, which naturally would be the version on the most recent computer chosen to create a block. Both Bitcoin and Ethereum implement this mechanism.

After a computer is selected to create the next block, bringing the blockchain back on track, we still have to wait for several more blocks to be created. Due to potential communication delays between the computers in the system, it’s technically possible for some of them to have still the old invalid block in their version of the blockchain.

After a certain number of blocks have been created, this is no longer a risk, as we can assume those outdated computers have undergone chain reorganization to change their database to the current and correct one. Only then can we consider the transactions in the initial block final and irreversible.

And now, we’re ready to define time to finality, which means how long it takes for a transaction to be considered irreversible after it’s submitted. On Bitcoin, it takes around an hour (6 blocks created). On Ethereum, it takes around two minutes (12 blocks created). On the Fantom mainnet, it takes only a few seconds.

That’s because Fantom's design allows a block and its transactions to be considered final and irreversible the moment they are added to the blockchain. The longest chain rule and chain reorganizations do not exist on Fantom. Once a transaction has been added to the blockchain, it’s instantly final.

There are a few things that work in conjunction to make this possible. On Fantom, no single computer is chosen to create the next block. Instead, the block is added to the blockchain once the majority of the computers in the system have received it. As such, there can never be a situation on Fantom in which the computers disagree on the state of the database. If you’re curious about the technical details behind Fantom’s architecture, read our approachable article.

Last updated

© 2024 Fantom Foundation