Gas Fees: A Small Guide

Gas Fees: A Small Guide

Like a machine, the Ethereum network relies upon fuel to keep it running, we call this ‘gas’. You can check the current gas price here.

What are gas fees?

The gas fee is the unit that indicates what users must pay for performing a transaction, executing a smart contract, as well as launching dapps on the ethereum blockchain. Fees are calculated in gas and paid for in ETH.

Key features of gas:

Gwei is the denomination of the gas fee

1 gwei = 0.000000001 ETH

The gas limit is how much a user is willing to pay to perform a transaction

The price of gas (gas price) is the amount of gwei the user is willing to spend on each unit of gas

In each transaction, senders set the gas price and limit. To calculate the total gas cost for an ETH translation we have to multiply the gas limit by the price.

For example, if the limit is 50,000 units and the gas price is 20 gwei, the user is then ready to spend 0.001 ETH on the translation.

The higher the gas price the seller is willing to pay, the more likely the transaction will be included shortly, because the mining reward is higher. After a transaction is completed, any unused gas will return to the sender. And if the required gas was not met, the transaction will be reverted, and the user loses the spent gas. This is done to combat DDOS attacks on the blockchain..

On Summer.fi, we use EIP-1559 style transactions, which feature some new benefits to the transaction process:

  • It can makes the gas fees more predictable
  • It can reduce delays in processing transactions
  • It can result in better user experience

How does it work?

The blockchain requires a certain amount of ‘computational effort’ to keep the network running and secure. This is generated by cryptocurrency miners who receive ETH as rewards for contributing to the network. The ETH rewards come from the gas fee, so at competitive times the fee is higher where blockspace is limited. Congestion happens when more and more transactions use the Ethereum network for validation. With limited supply, the price for transactions will go up.

Because Ethereum’s “block space” has become increasingly more valuable over time, gas prices have surged at times. Using the EIP-1559 fee model, we can see some changes to improve the user experience, and the way that gas fees are determined.

The EIP-1559 model works a little bit differently than the ‘legacy’ transaction model. It introduced a BaseFee which sets an automated gas fee price that must be paid for a transaction. The price still fluctuates higher and lower with block demand but ultimately aims to regulate gas fee spikes that occurred in the legacy transaction model. The EIP-1559 model also increased the ethereum block capacity from 12.5M to 25M gas per block. The network targets operation at 15M gas per block (or roughly 50% capacity). When it is higher than 15M the BaseFee goes up, when it is lower than 15M it will go down.

EIP-1559 also introduced the MaxPriorityFee function, where users can ‘tip' miners to incentivise transaction priority. Including this tip results in what we call MaxFeePerGas. These transactions are ordered based on the MaxPriorityFee & MaxFeePerGas. One benefit here is that the user gets back a piece of the gas they paid based on the following formula:

Gas returned = User submitted MaxFeePerGas - (Actual BaseFee + MaxPriorityFee)

Essentially, if the user pays more gas than is required they will get the difference refunded.

How to minimise the price

Although gas is an unavoidable and necessary fee we must pay, here are some different ways to minimise the costs:

  • Gas price varies with the transaction type. Grouping transactions can organise the types of similar transactions and then optimise the price as it is performed in one go. If you’re planning to buy a certain amount of tokens, it can be better to group them into a single buy, rather than spread across multiple, due to gas costs.
  • Time optimization can help users understand the daily congestion trends through activity history charts, and find cheaper rates, as congestion will fluctuate with daily traffic across the network. Performing a transaction at midnight might have lower gas fees than the afternoon, because we have to consider that activity will differ globally with time-zones. You can look at the live Ethereum gas price here
  • Simulating transactions can help reduce gas fees. It can be hard to determine the gas fee until you perform a transaction. However, using a simulation can run the transaction virtually - and estimate the gas fee - before performing it in real-time on the network. Etherscan and Blocknative ETH gas estimator both work at estimating gas prices.
  • Comparing competitive rates on dApps can help using gas-minimized products. Using applications targeted at optimising transaction costs can be one of the most effective ways to reduce gas fees. The Balancer V2 protocol, for example, groups the system into one big vault instead of many different constituent pools. This then makes the Balancer gas fees much cheaper.

The introduction of the EIP-1559 model, with new structures like the BaseFee function, has also worked hard at improving the efficiency of gas fees for consistent user experience. With Summer.fi you will use EIP-1559 style transactions, meaning you will not overpay gas fees for your transaction.

How does Summer.fi take care of transaction costs?

As a team we realize that transaction cost is an issue for our users. That’s why we try our best to allow you to optimize these costs.

With Summer.fi Multiply, you are able to merge the transactions, which means you can reduce gas while interacting with your Vault, thanks to ​​DS-Proxy.

Also, with the recently added Profit and Loss calculation we include gas, which we know is very impactful in one’s investment evaluation.

Next steps include the creation of strategies and “receipts”, looking into L” solutions too, which are also meant to try to reduce the costs of transactions.

Getting help

If you have any questions regarding Summer.fi in general, you contact us at support@summer.fi or on our social media.

Summer.fi

Summer Blog

Twitter

Discord