Gas — Ethereum fees

Term gas is often used around every transaction on Ethereum network and its scaled solutions on higher levels, like polygon ecosystem. It…

Gas — Ethereum fees

Term gas is often used around every transaction on Ethereum network and its scaled solutions on higher levels, like polygon ecosystem. It is commonly known, that every transfer causes extra costs which are defined by gas fees.

However, is there a way to lower it? What exactly is it?


Agenda:

  • intro,
  • definition,
  • why gas fee exists,
  • gas limit,
  • priority fee,
  • max fee,
  • conclusion.

Definition

Gas is the payment send to node operator/validators, in exchange of executing deployed smart contract. Gas is denominated in ETH or its 1/10^9 part, called GWEI.

Gas amount is estimated and depends on network congestion. What is worth of mentioning, smart contracts execution can be speed up, by manually increasing the value.


Why gas fee exists?

Gas fees keep network secure and prevents it from undemanding actions, like accidental infinitive loops and computational wastage. Moreover, additional costs prevents some bad actors to cause vulnerability in a network.

In addition, each transaction has to consist limit of computational steps of code execution that can be used. The very fundamental unit of computation is “gas”.


Gas limit

Gas limit is about how many cycles transaction has to make, but gas price is the price per unit of a gas. As the cost of a transaction is returned multiplied gas price per unit and number of gas units (gas limit).


Priority fee

It is the payment, which place transaction on top of the stack. Execution of smart contract is faster when this payment is proceeded.


Max fee

Users can specify the maximum value of fee per transaction, so that transfer can be proceeded only when the combined amount of base fee and the tip (gas fee) will be below declared level.


Conclusion

Gas is an inseparable part of the decentralized ecosystems like Ethereum and its scaled solutions, built on top of that.

Gas prevents infinitive loops and wasting computational power for art contracts which has serious vulnerabilities.