A gas fee is required to execute a transaction on the network in a distributed ledger technology such as the Ethereum blockchain or Hedera Hashgraph. The gas fee in Ethereum Blockchain is paid as Ether (ETH). Gas fees are used to incentivize validators or miners in the network as a reward for validating and processing transactions on the network. The amount of gas fee depends on the complexity of the action being performed, the current demand for network resources, and the amount of data being stored on the network. In this blog, let’s briefly look at what makes a gas fee very volatile and how some technology, such as Hedera, has a predictable gas fee.
In most blockchains such as Ethereum, Polygon, etc., the amount of gas fees required to execute a transaction varies very much within minutes. This unpredictability of gas fees often causes distress to users. It can result in transaction failure or even loss of an unprecedented amount from the wallet. The key reasons why gas fees are very volatile are;
Reach out to us today for a no-obligation consultation
The image below shows the volatile gas fee of Ethereum in 7 days. You can notice that the gas fee drastically increased from day 2 to day 3 and day 4 and then dropped value on day 5. Gas fees can be unpredictable due to the dynamic nature of the network and the underlying market conditions.
In certain blockchain and DLTs that uses more efficient consensus mechanism, the gas fee to execute the transaction can be predefined. In such networks, the gas fee will not depend on the network congestion and other factors mentioned above. The best example is Hedera Hashgraph’s predictable gas fee. The consensus mechanism offered by the Hedera network, Hedera Consensus Service (HCS), allows for predictable gas fees.
Hedera’s gas fee is determined by the complexity of the transaction and is set at a fixed rate. This helps developers and users predict the cost of executing a transaction. Moreover, the high throughput of the Hedera network keeps gas fees low.
Predictable gas fees in Hedera include the intrinsic gas cost, the cost of the EVM operation from the London gas schedule for non-Hedera Service transactions, and any additional fees for Hedera Service transactions. The intrinsic gas cost is a fixed amount of 21,000 per transaction, plus the cost of input data, which is calculated as 16 gas per non-zero byte and 4 gas per zero bytes.
When calling a Hedera Service transaction within a contract, an additional Hedera Service transaction gas fee will be assessed in addition to the intrinsic gas cost and EVM operation cost. The Hedera Service transaction gas fee is calculated using the USD price of the native Hedera Service transaction multiplied by the gas/USD conversion rate with an additional 20% charge.
To calculate the total gas fee of a non-Hedera Service transaction, you would add the intrinsic gas cost and the EVM operation gas cost. For a Hedera Service transaction, you would add the intrinsic gas cost, the EVM operation gas cost, and the Hedera Service gas cost owing to its predictable gas fee.
The gas price in USD can be calculated by multiplying the gas amount by the USD/gas conversion rate, which is $0.000_000_0569 USD/1 gas for contract call transactions. A test network can be used to validate the gas costs for execution. HAPI fee is wrapped into the per gas unit cost for contract call transactions and is not charged additionally.
Reach out to us today for a no-obligation consultation