The Fantom Sonic testnet phase is presently in full swing, with numerous individuals engaging with the open testnet to encounter its remarkable performance. As part of that, many technical terms are being tossed around for assessing the network and its transactions, including gas and transaction fees. We will illuminate some of these crucial terms and endeavor to make them simple and easy to understand.
Fantom Sonic Testnet: What is gas?
In our everyday lives, we pay for nearly everything we utilize, such as electricity and water. On our utility bills, these two are gauged in kilowatt-hours and cubic meters. Similarly, in a decentralized system like Fantom, we also incur charges for our activities, which are quantified in gas.
Gas is a unit that quantifies the computational effort needed to process a transaction. Think of it like how much fuel your car necessitates to drive a specific distance. A transaction’s gas used merely signifies how much gas was needed for that transaction to be processed.
What does it signify?
The gas price gauges how much you pay for it and is typically presented in a unit called gwei, which is equal to a billionth of an FTM. For instance, if a swap transaction requires 200,000 gas to process and the gas price is 30 gwei (0.00000003 FTM) per gas, you multiply these two figures to get your transaction fee, which is the ultimate price you pay for your transaction, as depicted below. Similarly, consider this comparison: if your car requires 50 liters of gasoline to reach its destination and the gasoline price is 2 USD per liter, the total cost is determined by multiplying these two values.
Fantom: Validators and Transaction Fees
As transactions can encompass intricate operations sometimes, you won’t always ascertain how much gas they will utilize. Consequently, the gas limit ascertains the maximum amount of gas you’re willing for your transaction to consume to be processed. If you set a gas limit lower than what your transaction necessitates, it might be stuck waiting as no validator is prepared to process it, akin to you being stranded halfway to your destination if you don’t fill your car with adequate fuel.
Now chiefly, to whom is the transaction fee remunerated? Validators. This is the fee that encourages them to stake FTM to sustain the Fantom network’s operation by processing transactions and incorporating them in blocks. The transaction fee also averts spam, dissuades malevolent actors by rendering attacks costly, and ensures equitable utilization of network resources.
At The End
Within the Fantom Sonic closed testnet, the average gas consumed by transactions is approximately 200,000 gas. The transactions are apportioned roughly as indicated below.
10% constitutes native token transfers with 21,000 gas per transaction.
64% comprises ERC20 token contracts executing the transfer or mint functions with 40,000 gas per transaction.
25% embodies Uniswap chained trades of 10 consecutive swaps of ERC20 tokens via Uniswap pairs with about 600,000 gas per transaction.
1% encompasses chained swap trades of 32 ERC20 tokens via Uniswap pairs connected in a loop with roughly 2 million gas per transaction.