So what exactly is gas? Why are transaction fees so high at the moment? And what are some of the ways to make the transaction cost lower? You’ll find answers to these questions in this video.
Gas is a unit used for measuring the amount of computational effort required to perform specific actions on the Ethereum blockchain.
The name itself hasn’t been chosen by accident. Similarly to gasoline fueling a car and allowing it to drive, gas on the Ethereum network fuels transactions and allows them to perform different operations.
Every operation on the Ethereum blockchain, or to be precise on the Ethereum Virtual Machine (EVM), has an associated gas cost. For example: adding 2 numbers costs 3 gas; getting the balance of an account – 400 gas; sending a transaction – 21,000 gas.
Smart contracts usually consist of multiple operations that together can cost even hundreds of thousands of gas.
What is interesting is that the gas cost by itself doesn’t tell us how much we have to pay for a particular transaction. To calculate the transaction fee we have to multiply the gas cost by gas price.
The gas price is measured in gwei – a smaller unit than ether where 1 gwei equals 0.000000001 ETH. We can think about it as a major and a minor unit similarly to dollars and cents.