How does gas work? (Infographic)

November 5, 2018

A large percentage of the questions we get about Ethereum from friends has to do with gas – how does it work, why is it needed, what the heck are gwei and where do they go? We figured a nice, simple infographic that answers all of these questions would be a good way to clear this up. And so we made one.

Feel free to share it with anyone who would benefit from it or join us in the comments below for any feedback, suggestions or additional questions.

Updated and refined on November 6, 2018 thanks to feedback from reddit.


Infographic on how gas works in Ethereum created by Decenter


Nikola Janković

David says:

What happens if the user sets the gasPrice or gasLimit too low?

Nikola Janković says:

Hey, David!
In case the user sets the gasPrice too low, miners are less likely to pick it up and and include it, or, to be more precise, they will prioritize other transactions with higher gas prices set. This means that it may take a very long time for a transaction to go through with a low gasPrice, even a couple of days potentially.
However, the gasLimit is more important in this case and, if set too low, then the transaction will simply not have enough gas to execute and it will fail.
If you’re having troubles determining at how much you should be setting gasPrice and gasLimit, you can stop by ETH Gas Station to find a recommendation based on the network status.
Does this help?