What is a Gas Fee?
To understand Gas fees, one needs to look at it from the same perspective as, for example: driving a car; one requires fuel. Likewise, Gas fees are the fuel that powers the Ethereum network and the tokens that operate upon it. Gas can be explained as an essential fee required to execute a smart contract on the blockchain protocol in the blockchain world. In scientific terms, a Gas fee is a unit of measurement towards the amount of computational effort or “work” required to execute a smart contract or any tokenized operation on a Blockchain. The mechanism behind the Gas fee works on simple supply and demand, and thus the price to pay as Gas fees can fluctuate constantly depending on the network demand. So in simple terms, if more nodes are interacting on the blockchain for executing smart contract operations, given the limited quantity of computational resources on the network, the Gas price will show a significant increase. On the contrary, if the computational network resources are underutilized, the cost to execute a smart contract would decrease.
Eth Gas Fees:
On the Ethereum blockchain network, to process a transaction, a user must pay a certain amount of Eth as a Gas fee which measures the computational effort required to execute an operation on the Ethereum network. The Gas fee under the ETH network is paid in Etherum native currency. Since inception, the Gas fee on the ETH network can be simply calculated as:
Gas PRICE per unit (in Gwei) ✖ Gas LIMIT,
Where the Gas limit is the maximum amount of Gas you are willing to pay to validate the transaction, and the Gas price is the specific amount Ether one is willing to pay for each unit of Gas. Gas prices are denoted in Gwei, a denomination of ETH, where each Ether is equal to 1 billion Gwei.
To illustrate how the Gas fee is calculated, let’s say Tim likes to pay Alex 1 Eth, and in this transaction, Tim set up a Gas limit of 25,000 units, and the Gas price is 400 Gwei. So the total Gas fee paid than would have been, Gas limits * Gas Price, that is 25000 * 400 = 10,000,000 or 0.01 ETH.
Source:https://medium.com/mxc/a-brief-explainer-1d36cea54837