What is Gas, and how is its price determined? Why isn't gas fee a stable metric? How can one reduce transaction costs on the Ethereum network, and what resources can be employed for this purpose?
Gas is a fundamental component of the Ethereum network, playing a pivotal role in the validation and execution of transactions as well as the execution of smart contracts. Gas is essentially a unit of measure indicating the computational effort necessary to carry out operations within the network.
Each transaction or execution of a smart contract utilizes a certain amount of the validators' computational power. Ethereum blockchain users compensate for these services with ETH – the digital fuel that powers the network.
The price of gas and the factors influencing it
The transaction cost is determined by the gas price, denoted in a unit called Gwei. Gwei is the smallest fraction of Ether, where 1 ETH equals 1,000,000,000 Gwei (or 1 billion nanoether). The overall cost incurred by the validator is calculated by multiplying the gas price by the amount used. For example, if the gas price is set at 20 Gwei and the transaction consumes 200,000 units of gas, the total cost will amount to 0.004 ETH (20 * 200,000). After transitioning to Proof of Stake, validators also started receiving additional "tips" over the base rate.
The gas price is primarily a market variable, governed by the forces of supply and demand, and influenced by the following factors:
1. Network Congestion: During periods of high demand on the Ethereum network (for instance, during peak transaction times), gas prices inevitably rise. This surge is due to the network's limited capacity to process data within a specific timeframe. Users are then compelled to compete with each other, offering higher priority fees to ensure their transactions or smart contracts are processed promptly and incentivize validators. In such scenarios, the cost of transferring an asset can even surpass its actual value.
2. Gas Limit: Each Ethereum block has a restriction on the maximum amount of Gas that can be included. This implies that the size of each block is confined by the cost of processing the transactions it contains (contrarily, Bitcoin blockchain limits the block size based on bytes of information). If demand for gas exceeds its limit, some transactions may not be included in the block, leading to delays in the mempool (the holding area for pending transactions) or even transaction failures. Users who set a low price for their transactions are most affected, resulting in a competitive race for transaction inclusion.
3. ETH Market Price Dynamics: The volatility of the native cryptocurrency of the blockchain directly influences the cost of transactions since validators are rewarded in ETH. Consequently, the dollar equivalent of these costs can significantly fluctuate.
Strategies to Minimize Gas Prices Amid Rising Demand
As we have previously reported, following the transition of the Ethereum blockchain to the PoS algorithm, many anticipated a decrease in the costs associated with validators' services. However, this hasn't happened yet, due to the persistent limitation on the number of transactions that can be included in a block. Furthermore, services tracking the cost of information exchange indicate a rising trend. This increase is attributed to factors such as the meme frenzy enveloping the crypto community, the launch of numerous dApps on the Ethereum network, and the employment of MEV bots to censor transactions.
When gas prices soar due to heightened demand, users can optimize their costs in the following ways:
1. Layer 2 Solutions: These technologies help to reduce the load on the primary blockchain, speed up transactions, and lower commission fees. The most popular L2 protocols include OMG, Optimism, Polygon, and Arbitrum.
2. Choosing the Best Time for Transactions: There exist online services that display the least busy times and days of the week for the Ethereum network. One of the most accurate among them is gasnow.org, which even considers the user's timezone. If your transaction is bulky or layered, requiring a significant amount of gas, it is advisable to execute the transfer during night-time on weekdays. This is when Asian markets have wound down, and Europeans are just waking up. By doing so, you could save anywhere between 20% to 50% on transaction fees.
3. Scenario Modeling: Usually, users find out the price of executing a transfer post-factum, leading to situations where the gas price exceeds the transferred assets' total. However, certain applications use specialized algorithms for pre-calculating the transaction costs. For instance, DeFi Saver allows real-time expenditure calculations. Blocknative, on the other hand, inspects all pending transactions in the mempool, anticipates which ones might be included in the next block, and suggests an appropriate gas price to prioritize the transfer or smart contract execution speed.
Additionally, it's advantageous to combine several transactions into one, whenever feasible. This could be useful, for example, if you wish to move ETH from multiple crypto wallets to the same dApp. This method can significantly cut down on financial expenses.