How gas works on the Ethereum network
This post discusses the issue of gas on the Ethereum network and steps taken by 1inch to reduce users’ gas costs.
Gas is a fundamental unit representinging how much computation work is done to perform a transaction or any other activity on the Ethereum network. It’s also the driving force behind the blockchain that makes this computation possible. Including every transaction in a block, processing it and adding new blocks to the blockchain is the responsibility of validators, who receive a percentage of their ETH in staking as a reward for doing this kind of work. A gas fee per computation and double-checking blocks also stimulates validators to prevent spam and increase the network’s security. This process is at the core of the Proof-of-Stake consensus algorithm, and validators are basically doing what miners did in Proof-of-Work when mining new blocks before the switch to Proof-of-Stake.
The principle of calculating the gas price
Transactions are combined into blocks, where they are synchronized and executed simultaneously. The minimum price per gas unit depends on the demand for inclusion in a block, and it is automatically updated according to the current amount of users engaged with the network. When a large number of users apply for a place on a block to conduct a transaction, they raise the price of gas in order to prioritize their transaction. Accordingly, it becomes expensive for everyone to execute transactions during such periods. When demand for network services falls, the price of performing transactions also goes down. Each block is limited in size, and so is the amount of gas space for it.
Gas is denominated in Gwei, which amounts to 0.000000001 ETH, Ethereums’ native currency.
Handling gas on 1inch
Gas fees for transactions on Ethereum are paid in ETH, and 1inch enables users who don’t yet hold any crypto to buy ETH or other coins for fiat directly in the 1inch Wallet.
Also, 1inch users can customize the price of gas when making swaps. They can choose between the “Market” option and the “Aggressive” option, which speeds up the transaction’s execution. There is also a custom option for those who prefer to set the gas price themselves.
“Max base fee” and “minor priority fee” in the custom price settings are for fees set by the network’s automatic calculation, and users adjust them according to the highest amount they wish to pay. They receive the difference between the max base fee set and the actual base fee after the transaction is completed. A minor priority fee stands as a validator’s tip to prioritize users’ transactions.
1inch’s ways of reducing the gas costs
Today, Ethereum appears to be one of the busiest networks for transactions, and its blocks are now full all the time, which is unlikely to change soon. The reason is that the Ethereum ecosystem continues to evolve and attract more and more users, boosted by the development of NFTs and an increase in the number of Ethereum-based dApps. And as demand for the Ethereum blockchain goes up, so do the fees, which tend to be very expensive at times of the network’s congestion. As already mentioned, fees depend on the network’s popularity and are driven by users’ preference for different transaction execution rates, which vary based on the amount of gas they spend. Hence, the issue of saving on gas is going to remain relevant for quite a while, which Ethereum provides, suggesting several ways to reduce gas costs.
Meanwhile, 1inch offers multiple options enabling users to almost fully cover their gas costs.
Gas refund up to 95%
1inch allows users to compensate up to 95% of gas spent on Ethereum transactions. The terms of the Gas Refund program are quite simple and include the staking of 1INCH, native tokens of the 1inch Network. The percentage of compensation depends on the number of tokens in staking. The staking of 100,000 tokens or more is enough to get a maximum reward of 95%, which is quite beneficial for those who frequently make swaps on the Ethereum network. However, the program also extends to those users who don’t stake at all, compensating 5% of their gas costs.
Gasless limit orders
Another opportunity for saving on gas is to place limit orders when exchanging tokens that support permits for ETH. This order type may not be executed under certain conditions and there are time restrictions if the user sets a length limit for its execution. But when placing limit orders with supported tokens, no commission is charged for gas.
Timing for transactions
For non-urgent transactions and those users who can wait, there is a way to find the optimal value for a transaction on Ethereum, which, though not much, varies throughout the day or week when there is less congestion on the network. Exploring the price chart that appears when selecting “Сlassic mode” for a swap can help in identifying gas pricing trends.
Using alternative L2 solutions
Ethereum’s high gas prices have spurred the arrival of Layer 2 solutions, such as Polygon, Arbitrum, Optimism and others, which put some of the transaction volumes on a separate network and confirm the results on the Ethereum blockchain. 1inch also sometimes incentivizes active L2 users by rewards, like it was recently the case with OP tokens rewards. These options are attractive in terms of reducing gas costs, although one must always compare gas prices, as there have been short periods when the cost on some L2 networks could exceed the cost of gas on Ethereum Mainnet. You also have to keep in mind that L2 withdrawing and depositing can sometimes take longer and you have to use these blockchains’ native tokens to cover gas costs.
Anyway, 1inch is striving to optimize users’ gas costs on Ethereum in all possible ways and make using the network more attractive and efficient.