Let’s get it straight..
If you have already made an Ether transfer in the past or have participated in an ICO, then you have probably encountered the concept of “gas” in the Ethereum network. So, what is it? Is it some sort of digital fuel?
Well, in a sort, yes. This is actually a special unit used in Ethereum. It measures the amount of work a set of actions would take to perform. A unit of it measures the smallest amount of work possible on Ethereum and it‘s precisely a pricing value.
Why is it so important?
Among the actions that require it, there are transactions and the work that miners perform to include transactions in a block. Miners are paid for their work in fractions of Ether called “gwei” that include the gas price of the transaction. It is given from users to miners and is subtracted from the total transaction value. In order to make a transaction, you have to pay the miners providing computational power, whether the transaction succeeds or fails.
Gas price and limit
You have also probably heard about “gas price” and “gas limit”. In order to understand that, let‘s do a simple simulation. Let‘s think on one hand of gas limit as the maximum amount of fuel a car tank can hold. Gas price on the other hand would then represent the cost of a liter/gallon of fuel.
This way, a transaction fee is these two multiplied. The gas limit is therefore the maximum amount of units a user is willing to spend when doing a transaction.
But, you should always keep in mind that your gas limit should be more than or equal to the demands of the computational work your transaction needs. Or else, the transaction will fail due to an “out of gas error”.
If an operation has to be done quickly right away, the price obviously increases as the effort of miners increases.
Vitalik Buterin envisioned this as a basis for the economics of scarcity. This system gives priority to the most important transactions. The costs/rewards are publicly shown to the miners. This is meant to establish fairness in keeping the network secure and rewarding the miners in an impartial way according to their efforts.