chainfluent

Gas Explained

Quick Links

What is Gas?

Why Is There Gas?

Gas Limit

How is Gas Calculated?

Gas Fees 101

What is Gas?

(Ethereum) Gas is the fee paid for executing transactions on the Ethereum blockchain. Want to move ETH between different addresses? That transaction requires gas. Want to mint some NFTs? That requires gas too. What about exchanging ETH for different tokens? You guessed it, more gas!

Why is There a Gas Fee?

Each transaction on the Ethereum blockchain requires a certain amount of computational power and gas is the fee paid to miners for providing that computational power.

Gas fees also help keep the Ethereum network secure. Attaching cost to every transaction prevents spamming or accidental infinity loops.

Gas Limit

Gas limit is the maximum amount of gas you are willing to use on any given transaction. If the actual amount of gas used turns out to be lower than the limit you specified, the remaining gas will be returned to you. But if your limit is too low, you either won’t be able to process the transaction or the transaction will fail and you will lose that gas. This is especially dangerous when you’re trying to purchase a token at the time the network is busy and the price is changing rapidly (e.g. when the price is pumping immediately after an influencer posted a video about the token you’re trying to buy).

How is Gas Calculated?

The price of gas is denoted in gwei (giga wei). Wei is the smallest fraction of an ether, i.e. 1 ether equals 1,000,000,000,000,000,000 wei, so 1 gwei is 1,000,000,000 (1 billion) wei or 0.000000001 ETH. This doesn’t sound too bad right? So why are people complaining about the cost of gas fees?

 
 

There are two elements that impact the cost of any given transaction:

    • gas price at the time of transaction, and
    • gas required for a particular transaction.
 
 

Ethereum gas prices change constantly and there are a number of websites where you can check the current price. CoinGecko is one of them, but the price isn’t always accurate, so I prefer to use ETH Gas Station or Gas Now, which you can also install as a browser extension.

At various points in time, I’ve seen gas prices as low as 6 gwei and as high as 2,000 gwei. Why can they change so much? It simply depends on how busy the Ethereum network is at a particular moment in time. The busier the network, the higher the prices.

When checking the price of gas, you’ll often see 3 or 4 different prices based on transaction speed: rapid, fast, standard, and slow (or other similar names). Unsurprisingly, the faster the transaction, the more you will pay and the price difference can be quite substantial. Generally speaking, when buying or selling tokens you want to use the fastest option, especially when their price is moving quickly. On the other hand, if you’re only moving tokens between wallets, or buying tokens when the market is quiet, you can go for standard or slow speed as it doesn’t really matter if the transaction takes a bit longer to go through.

The second factor is the amount of gas required for any given transaction. The minimum amount needed for the simplest transaction on the Ethereum network, for example moving ETH between two addresses, is 21,000 units. More complex transactions involving smart contracts such as buying other tokens or staking your tokens require a lot more gas.

It’s also worth mentioning that some transactions require multiple steps and each of those steps will require a certain amount of gas. For example: exchanging Tether (USDT) for Chainlink (LINK), actually requires two transactions: USDT > ETH and ETH > LINK. If you want to process a transaction like this on (say) Uniswap, you will only see an estimated gas fee for the first ‘step’ (USDT to ETH in this example), so don’t be surprised by the added cost of the second ‘step’.

Follow Us