Fantom Foundation Introduces Testnet for Fantom Sonic
We are thrilled to announce Fantom Sonic, the latest breakthrough upgrade to Fantom that will scale the network to new heights.
With a brand-new virtual machine, improved database storage, and optimized consensus, Sonic is anticipated to achieve 2,000+ transactions per second (TPS) at an average finality of one second while consuming a fraction of the storage used by its predecessor, Opera. The upgrade is the latest step in Fantom’s mission to improve its underlying platform without resorting to sharding or additional layers.
Today, we are releasing access to the Fantom Sonic testnet environment to give users and developers a first-hand experience of the groundbreaking speed offered by the upgrade before its mainnet release, which is scheduled for spring 2024. Scroll further to learn more about Sonic and instructions on how to use the testnets.
What is Fantom Sonic?
Fantom Sonic is the name that covers the new Fantom technology stack, replacing the previous Opera. The new technology stack is included in the new Fantom Sonic Client that validators and other nodes will run to power the network, which comprises mainly the Fantom Virtual Machine (FVM), Carmen database storage, and an optimized Lachesis consensus mechanism.
In other words, Sonic is the next iteration of the Fantom network, with no hard fork required for the upgrade. Existing smart contracts, services, and tools on Fantom Opera should be fully compatible with mainnet Fantom Sonic as the FVM is fully compatible with the EVM and its programming languages (Solidity, Vyper etc).
In unison, the three upgraded components of Sonic elevate Fantom to unprecedented levels and allow the network to achieve an anticipated 2,000 TPS at a finality of around one second with up to a 90% reduction in storage, putting Fantom far ahead of its peers. Learn more about these components in technical detail further below.
As users continue to embrace blockchain-powered applications, a single popular application can slow an entire network. Sluggish performance of the network prevents the overall adoption of emerging decentralized applications. With its innovative technology, Fantom will allow new markets to adopt blockchain technology previously hindered by limited transaction throughput and slow finality.
We envision a new era of DeFi platforms, blockchain games, high-frequency oracles for perpetual trading, and many other applications that can leverage the speed and scalability of Sonic. Additionally, due to the significantly reduced storage requirements, it will be far more affordable and accessible to run a node on Fantom to partake in network consensus or provide data to dApps.
Sonic Testnet Environment
The Fantom Sonic testnet environment consists of two separate testnets to demonstrate the upgrade before its mainnet release. The closed testnet aims to showcase the maximum theoretical limits of Sonic, whereas the open testnet is interactive, allowing any user to experience Sonic directly.
Closed Testnet
The Sonic closed testnet is observable to the public but does not allow users to submit transactions. A web dashboard shows the maximum performance of Sonic, such as transactions per second, time to finality, average block time, and more.
The dashboard shows that the closed testnet Sonic can process around 2,048 TPS with end-to-end transaction confirmation times (finality) of around 1.1 seconds. At the time of writing, the testnet is processing over 175 million transactions per day, showing the stability of the network even when driven to its limits.
In the closed testnet, a transaction feeder submits synthetic transactions and drives the network to its maximum performance. The transaction feeder is throttled when transaction finality rises beyond roughly 1.1 seconds, which occurs when transactions per second surpass roughly 2,048.
There is no room for public interaction in this testnet setup as the transaction feeder drives the network to its maximum performance. The synthetic transactions resemble transactions on the current Fantom mainnet with an average of 210,000 gas. The workload is distributed roughly as follows:
- 10% constitutes native token transfers with 21,000 gas per transaction.
- 64% constitutes ERC20 token contracts executing the transfer or mint functions with 40,000 gas per transaction.
- 25% constitutes Uniswap chained trades of 10 consecutive swaps of ERC20 tokens via Uniswap pairs with about 600,000 gas per transaction.
- 1% constitutes chained swap trades of 32 ERC20 tokens via Uniswap pairs connected in a loop with roughly 2 million gas per transaction.
The closed testnet uses an evenly spread stake of 10 million FTM per validator. With 21 validators, the total stake is 210 million FTM. The required consensus quorum is two-thirds of the validators plus one, with a stake of 140,000,001 FTM. The consensus mechanism requires at least 15 validators to confirm blocks for this setup.
We will compare this to the Fantom mainnet, on which the stake is non-uniformly distributed. The total stake on September 25, 2023, at 2:00 PM UTC was 1,379,985,181 FTM. With these numbers, a quorum is reached by a minimum of 919,990,122 FTM. The combined stake of the top 14 validators is 926,970,795 FTM, which was sufficient to confirm blocks with one less validator than the Sonic closed testnet. As such, the closed testnet mimics the consensus of mainnet closely to demonstrate a realistic performance.
With this setup, the closed testnet achieves above 2,000 TPS with a finality of around 1.1 seconds and over 400 million gas per second. This is far beyond the achievable performance of the current Fantom mainnet, which sits at around 30 TPS. There will be a significant reduction in disk space requirements for validators and archive nodes. Currently, for approximately 518 million transactions, an offline pruned validator requires 1,194 GB (i.e. offline pruning removes historical states by stopping the validator), whereas Sonic with online pruning requires 351 GB only. Similarly, archive nodes require 10,893 GB on Opera but only 1,000 GB on Sonic.
We will upgrade and maintain the closed testnet with Fantom’s latest technology regularly. Hence, the closed testnet will be reset every two weeks.
Open Testnet
The Sonic open testnet allows anyone to interact with Sonic by submitting transactions and experiencing the true speed the new Fantom upgrade offers.
Similarly to the closed testnet, the open testnet has a transaction feeder that submits synthetic transactions. However, it submits 130 TPS at an end-to-end finality of around 0.6 seconds, which leaves ample throughput for user interactions.
The open testnet dashboard allows users to search for addresses, transactions, and blocks. Note that the open testnet’s history will be retained for longer than the closed testnet’s history. Furthermore, it is possible to deploy dApps on this testnet with a few limitations: the client source code currently is unavailable, and there is no full explorer similar to FTMScan and no transaction tracing support on our public RPCs.
The tutorial below covers the instructions to interact with the open testnet.
How to Use Sonic Testnet
Follow this tutorial to unveil the capabilities of Sonic and experience the next generation of blockchain technology. We use MetaMask in this tutorial, but any wallet that can mimic MetaMask will work.