What is Gas? Why you have to pay it?

Network fees on Ethereum are called gas. Gas is the fuel that powers Ethereum.

What are gas fees?

Ethereum is like a big computer network where many people can work together to do things like send messages and run programmes. Doing these things takes energy, just like in real life.

In Ethereum, there is a set price for each piece of computing that is done. The total cost of the things you do in your transaction is your petrol fees. It costs petrol to process a transaction or smart contract.

Why do you have to pay Gas?

Gas is a critical element in keeping Ethereum secure and processing transactions. Gas helps in many ways:

  • Gas keeps Ethereum sybil-resistant by preventing malicious actors from overwhelming the network with fraudulent activities.
  • Because computation costs gas, spamming Ethereum with expensive transactions, either accidentally and maliciously, is financially disencentivised.
  • A hard-limit on the amount of computation that can be done at any one time prevents Ethereum from being overwhelmed, helping to ensure the network is always accessible.
  • Miners are responsible for verifying and adding transactions to the Ethereum blockchain. They are rewarded for their work with ether (ETH), the native currency of Ethereum. Gas fees are a way of ensuring that miners are compensated for their time and effort.