Everything you need to know about Gas

When you hear “gas”, you probably think about central heating or filling up your car. However, we’re not talking about the fuel - here’s everything you need to know about gas as it pertains to cryptocurrency.

What are gas fees?

Gas refers to the data processing efforts needed to carry out certain actions on the Ethereum blockchain. If you want to make a transaction or execute a smart contract, you are required to pay a gas fee.

Gas fees are paid because miners are providing the computational power required to execute transactions. Think of it like a simple service – users want something done on the network, so they pay miners to carry it out for them.

Additionally, gas fees also help to keep the Ethereum network secure, as attaching them to each transaction helps to prevent spam or infinity loops.

Is there a limit on gas fees?

Users have the ability to set a maximum amount of gas they’re willing to pay to have their transaction executed. For every transaction a user wants to make, a maximum amount must be set. If the gas limit is high, then a user must do more work to execute a transaction using ETH or a smart contract.

However, it is important to be careful when deciding on setting gas fee limits. This is because users compete against each other for block space, and miners will decide not to include your transaction in a block if your fee is set too low. As a result, transaction approval will take much longer, and you’ll have to wait for other gas fees that users pay to decrease.

How are gas prices determined?

Gas prices are determined by supply and demand between network miners, who look for the highest fees attached to a transaction, then process them in a descending order. However, miners can also decline to process a transaction if the price doesn’t meet their threshold.

The price of gas is indicated in gwei (giga wei), which itself is a small unit of ETH, with a single gwei being the equivalent to 0.000000001 ETH. This may not sound like a lot at first, but Ethereum gas prices change constantly. This is because transaction costs are affected by gas price at the time of the transaction, as well as the amount of gas needed. For example, gas prices can be as low as 6 gwei, but then increase to 2,000 gwei when there’s high activity on the network. In other words, the busier the network, the higher the prices.

What is a mempool?

The mempool is where transactions wait to be confirmed by the network – a little bit like a queue or a waiting room. Much like with gas fee prices, the size of the mempool also fluctuates, with a large mempool size indicating high traffic volume, which then results in a longer confirmation time. The size of the mempool is often used to estimate how long congestion will last, whereas the mempool transaction count shows the number of transactions causing the congestion.

Will the ETH London Fork affect gas fees?

One of the main goals of Ethereum’s EIP-1599 upgrade is to change the way gas fees are estimated. Instead of users setting a maximum fee to get their transactions picked up by miners, this upgrade will give users a base fee to pay upfront, which is determined by how busy the network is. Users will also have the choice to pay a “priority fee” to get their transaction processed quicker.

While this doesn’t necessarily make gas fees cheaper, it does make them more predictable. It also gives users a better chance in getting their transactions approved.

Overall, much like your everyday petrol prices, gas fees prices are constantly changing, and getting your transaction picked up and approved by miners can very much feel like placing bids. However, the EIP-199 upgrade plans to change how gas fees work completely, thus improving user experience.

To find out more about the upgrade, check out our blog post here.

2 Likes