Everything You Need to Know About Gas Fees
Editor's note: We're entering a new era of cryptocurrencies...
Ethereum – the world's second-largest crypto – is slated for a massive upgrade that could cause crypto prices to soar across the entire market. So it's critical to understand not only how to identify winners, but how transactions are performed on the blockchain.
In short, Crypto Cashflow analyst Stephen Wooldridge II believes educating yourself on the various fees that are involved with trading cryptos can help you limit your spending while maximizing your profits...
In today's Masters Series, adapted from a September 29, 2021 Crypto Cashflow special report, Stephen details how crypto transaction fees are calculated... explains why some transactions end up failing... and reveals how you can avoid paying expensive fees...
Everything You Need to Know About Gas Fees
By Stephen Wooldridge II, analyst, Crypto Cashflow
There's nothing more frustrating than losing money.
But that's exactly what happens when you pay high fees for crypto transactions... or fees on transactions that fail.
You see, every transaction on a blockchain costs a fee. This "gas" fee goes to miners or validators who keep the blockchain running. This fee is paid even when a transaction fails.
Gas fees can vary wildly by hour, transaction, and blockchain. For example, on Ethereum (ETH) – the most popular blockchain for decentralized finance ("DeFi") – making a swap on an exchange can sometimes cost hundreds of dollars. The gas fee may even overshadow the amount you're swapping.
So it's important to understand how these fees work. That way, you can avoid paying expensive fees, or fees for transactions that fail.
Let's get started by looking at what makes up a gas fee...
Your gas price is going to be the price you set your transaction to. For example, miners of the Ethereum blockchain look at gas prices and choose higher ones to include in their blocks to make the most profit. That's because higher gas prices result in faster transactions.
Sites like CoinGecko, Etherscan, and many web-integrated wallets like MetaMask show current gas prices for low, market, and aggressive rates on the Ethereum blockchain – with aggressive being the fastest.
Gwei is a unit of measurement that represents a small amount of ETH. One ETH is equivalent to 1 billion gwei.
In a single day, gas prices can vary drastically. For example, in just a few hours, gas prices can go from 250 gwei for a standard transaction to 80 gwei. In June 2020, gas prices spiked all the way up to an average of 700 gwei.
You must also keep the gas limit in mind, which is the amount of gas you're willing to spend on a transaction. It tells the blockchain how much gas you want to use before calling it quits.
If your gas limit maxes out before your transaction goes through, then it fails. But you still pay that gas fee. So it's important to set a high enough gas limit to make the transaction successful.
For a standard ETH transfer, you only need a gas limit of 21,000 gwei. But for more complex transactions, like swapping between two cryptos or providing liquidity to a liquidity pool, your transaction's gas limit could reach 500,000 gwei or more. As you interact with DeFi protocols, you'll get a feel for what seems right.
Your total gas fee is your gas price multiplied by your gas limit.
Think of it like filling up your car with gas. If the price of gas is $4 and your car holds 10 gallons, you're going to spend $40 to fill it up.
So if you're trying to send 10 ETH to another wallet, and ETH Gas Station reports a standard price of 80 gwei, you would pay a maximum fee of 1.68 million gwei (80 x 21,000), or 0.00168 ETH. If ETH is trading for $2,000, that would be around $3.36.
Some blockchain transactions take a higher gas limit than others, especially DeFi protocols. Because of the complicated nature of smart contracts, they tend to require higher gas limits.
The table below shows different gas fees:
|
Gas Price |
Gas Limit |
Maximum Gas Fee (in ETH) |
U.S. Dollar Equivalent (with ETH at $2,000) |
|---|---|---|---|
|
50 |
21,000 |
0.00105 |
$2.10 |
|
50 |
200,000 |
0.01 |
$20 |
|
80 |
21,000 |
0.00168 |
$3.36 |
|
80 |
200,000 |
0.016 |
$32 |
|
100 |
21,000 |
0.0021 |
$4.20 |
|
100 |
200,000 |
0.02 |
$40 |
|
200 |
21,000 |
0.0042 |
$8.40 |
|
200 |
200,000 |
0.04 |
$80 |
|
250 |
21,000 |
0.00525 |
$10.50 |
|
250 |
200,000 |
0.05 |
$100 |
As you can see, your gas limit makes a big difference in how much you're going to pay. And the more complicated your transaction, the higher gas limit you'll need.
However, once your transaction is successful, any excess gas limit isn't charged. So using a gas limit of 200,000 gwei doesn't mean you're going to pay $80 with a gas price of 200 gwei. The transaction could be successful before that maximum limit, resulting in a lower gas fee.
The best way to understand gas fees is to learn how to read them on an Ethereum blockchain explorer like Etherscan...
First, search for your wallet address on Etherscan. You'll see an image like the one below...
Etherscan will show transactions you've already sent. You can click on the "Txn Hash" links in the left column to open up more details about each transaction.
The image below is an example of a simple transfer of 1 ETH. The gas limit was 21,000 gwei, which is standard for all basic ETH transfers. With a gas price of around 140 gwei, the total gas fee came out to 0.00000014 ETH. If ETH is at $2,000, that's less than a penny...
The following image is an example of a swap on Uniswap. The maximum gas limit was set to 177,492 gwei. But the swap only ended up using 122,371 gwei. With a price of 117.55 gwei, the total gas fee came out to 0.014385 ETH. That's around $28.77 with the price of ETH at $2,000.
The swap was for 0.0641 ETH, or $128.20 with ETH at $2,000. So the fee of $28.77 ended up costing around 20% of the actual swap. That's high – but it's better than the maximum fee, which would have been 0.020865 ETH, or $41.73.
The next example is a simple approval of Aave (AAVE) for trade on a contract address. The gas limit was set to 65,241 gwei and only used 53,647 gwei. So the total gas fee with a price of 127 gwei was 0.00681 ETH, or $13.62 with ETH at $2,000.
And in the below example, the gas limit was set to 611,798 gwei. Luckily, it only used 436,165 gwei of that limit. With a gas price of 136 gwei, it ended up costing 0.0593 ETH, or $118.60 with ETH at $2,000. But it could have been worse, with the maximum fee totaling 0.0832 ETH, or $166.40.
As you can see, setting higher gas limits gives you more wiggle room for your transaction to successfully send. But there are still times when setting a high gas limit and price can lead to a failed transaction.
There are several reasons why transactions may fail.
The first is if you're trying to do something you can't on a contract. For example, check out this transaction...
As you can see, it says "Reverted" on the failed transaction. The user was likely trying to migrate LEND (an old token) to AAVE (the new version of LEND) without first approving the LEND token for migration.
This resulted in the transaction failing. You'll notice the user set a 200,000 gwei gas limit for the transaction, but it only took 33,371 gwei for the contract to fail. Remember, failed transactions still take gas to execute until the point of failure. So the user could have ended up paying 0.0055 ETH, or $11 with ETH at $2,000 for doing nothing, but instead only paid 0.00092 ETH, or $1.84.
Another reason a transaction might fail is because it reaches its gas limit and has no room to continue...
When a transaction on Etherscan shows "Out of gas," it usually means the gas limit has been reached. You'll see the "Gas Limit" and "Gas Used by Transaction" numbers are the same. That means the maximum limit was reached, and the transaction had no more room to continue. The user paid 0.014265 ETH or $28.53 with ETH at $2,000 for a failed transaction.
In this case, you'd need to increase your gas limit to make sure you have enough room for the transaction to take place.
A third reason a transaction might fail is because your gas price is lower than the current rates and the transaction times out.
For example, if a transaction is sent with a gas price of 50 gwei when the standard rate is reported at 90 gwei, it will take the transaction a lot longer to go through – and it might fail.
No one wants to lose gas on failed transactions, so it's important to double-check that you're using at least the standard gas rate and that your gas limit is high enough.
As we said, Ethereum is the most-used blockchain for DeFi transactions. But fees can be expensive.
Polygon (MATIC), Cosmos (ATOM), Harmony (ONE), and Solana (SOL) are all trying to address high gas fees by making more scalable and adoption-friendly technologies. But it's hard to deny the dominance that Ethereum has on the DeFi space.
There is some good news, though...
Developers around the world have been tirelessly trying to improve the Ethereum blockchain.
On August 5, 2021, EIP-1559 launched. It aimed to reduce gas fees and lessen the total supply of ETH by introducing a "base fee" for all transactions and burning a portion of every gas fee.
But we have yet to see a significant improvement in fees.
Another improvement slated for Ethereum is the ETH 2.0 upgrade. ETH 2.0 will transition the Ethereum blockchain from a Proof-of-Work system that relies on miners to a Proof-of-Stake system that relies on stakers or validators. This should increase energy efficiency, speed up transactions, and drastically reduce gas fees.
The first phase has already been launched. With the "Beacon Chain," users can stake their ETH to become validators.
The next two phases are set to launch over time. Phase two is "the merge" and will bring the Beacon Chain and mainnet Ethereum blockchain together. The last phase, "shard chains," will reduce the congestion and load on Ethereum. You can read more about these upgrades here.
So in the near term, the best way to avoid high fees or failed transactions is to always check gas prices at CoinGecko, Etherscan, or on your Ethereum wallet before you make a transaction. If prices are high, be patient. And make sure your gas limit is set high enough for the transaction you're trying to complete.
Good investing,
Stephen Wooldridge II
Editor's note: This upgrade could have a massive impact on the entire crypto space. Crypto Capital editor Eric Wade believes it will create a slew of buying opportunities as crypto prices soar – even in today's bear market.
And this could take place as soon as August 31, which means it's crucial to start preparing now. That's why Eric has done the hard work for you, pinpointing five cryptos that he says offer the least risk for the highest potential upside... Click here for the full details.








