Crypto Wiki: Gas

Even a currency needs its own currency sometimes, and Gas is the one used to quantify the value of certain activities performed on the Ethereum network.

Gas is the Ethereum network's internal unit of currency, which is to say that it's used to calculate fees associated with transactions or for performing operations related to smart contracts. So gas isn't exactly the same as ether (ETH). Its job is a bit more specialized in that it is used to work out how much computing power will be expended on a particular task. The higher that amount is, the higher the gas price for it will be.

Fees are still actually paid in ether (ETH), but gas and ETH are not the same. Tasks that require computing power are calculated in terms of "gas cost". But the price for each unit of gas is expressed in ETH.

The gas cost relates to the amount of work, and the gas price is how much you paid for "each hour" of work. The way these relate to each other, as well as the gas limit, are used to calculate the fee for a particular transaction or operation.

If you want to get something validated more quickly then it will cost you more. The gas price will be higher, and it's done this way because it incentivizes validators to verify one transaction before someone else's. If the gas price is too low then a transaction can wind up being ignored because why should miners bother to validate it when the reward is so small?

This approach to gas pricing matters because it makes sure that the fee structure is appropriate and charging is fair. It also avoids resource wastage on functions that don't benefit the Ethereum network.

Note that since the gas price is usually such a tiny, fractional amount it makes sense to express it in "gwei" rather than ETH. One gwei equals 0.000000001 (or 10-9) ETH.