Ethereum vs Avalanche gas cost
Note: this is a translation from an Spanish article. That’s why screenshots are in Spanish.
Avalanche Mainnet is working some weeks by now. Lots of articles remarks it prices and short finality times advantage’s. Let’s try the C-Chain, an Ethereum Virtual Machine fork, but using Snow Consensus instead of Ethash.
The first step is to export staking rewards from P-Chain to X-Chain, and from there to C-Chain. After that, the AVAX are loaded in my Metamask Wallet.
Let’s try a simple AVAX C-Chain transfer first!
Each instruction executed by the EVM has a predefined gas cost. A simple Ether transference cost 21.000 gas, but deploying a complex Smart Contract can cost up to 8.000.000. In Ethereum, I must set a “gas price” I’m willing to pay to the transaction processer miner: the more I pay, the faster the transaction is processed. Site like EthGasStation gives you an estimate price to pay in order to get your transaction ready on a decent time. In Avalanche, the gas price is fixed for now, and the transaction cost do not go to the transaction validator, but it’s burned instead. The main good thing of this is giving no advantage to high paying fees whales.
The first test was transfer AVAX between two accounts of mine. Avalanche gas costs 4.7 Avax x 10^-7, so we must put 470 GWei on Metamask gas price.
The transaction cost was 0.00987 AVAX. By the experiment time, AVAX Token price was USDT 4.3843 on Binance, so the transaction fee was USDT 0.043. The processing time was something around 6 seconds, but some other transactions was processed as fast as a second fraction (network issues are important with fast consensus algorithms).
If we do the same test on Ethereum’s Mainnet, the cost at average speed is USD 0.43 (if we take what Metamask suggest). By experience, this transactions take something between 30 and 120 seconds. If we go for the fast speed, the cost goes to USD 0.68 and the time to 15–45 seconds.
A second experiment was check the cost of deploying a ERC20 Token. For this, we just import the token from OpenZeppelin GitHub.
In Avalanche, the cost of deploying the contract was 0.479938 AVAX. So, the fee is USD 2.1.
In Ethereum, the fee of contract’s deployment was 12.91, taking the 33 GWei gas cost (slow speed).
Deploying an Smart Contract no use to be an “”urgent task”, so we think is unnecessary compare with faster speeds. Anyway, this gas price was low compared with DeFi fever prices of last months: even 400 Gwei was reached. In this case, deploying this contact will cost more than USD 170.
This experiment confirm that costs in Avalanche are, so far now, 10% of the cost to operate at Ethereum’s Mainnet.