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 dive in further, 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 to it. Rather, it’s bundled into a “block” alongside other transactions, which is 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, the blockchain exists simultaneously on a massive amount of computers around the world that run software to communicate with each other and agree on the content of the database. (On Fantom, these computers are called validators.)
It’s these computers that 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 the majority of blockchains, a single computer is usually picked to create the next block and add it to the blockchain. Other computers in the system then receive this block and validate the transactions within it to make sure they’re valid.
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 version of the blockchain 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 still have the old invalid block in their version of the blockchain.
After a certain amount 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 as final and irreversible.
And now we’re ready to define time to finality, which simply 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 the design of Fantom allows for a block and its transactions to be considered final and irreversible the moment it’s 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 to learn more about the technical details behind Fantom’s architecture, read our approachable article on the topic.
© 2024 Fantom Foundation