“Gas” is the ETH required to power every transaction on Ethereum. Gas is a term that was coined to describe the ETH (ether) required to transact on the Ethereum network.
More specifically, every transaction that occurs on the Ethereum network requires a set amount of gas, which is the unit used to measure the computational power required to process a transaction. To process a transaction and include it in a block, miners are expected to be compensated for this task.
This is accomplished by setting a gas price with every transaction, which is the cost of 1 unit of gas, denominated in Gwei (1 ETH = 1,000,000,000 Gwei).
For example, when you send ETH from one account to another, this costs 21,000 gas. If you were to set a gas price of 1 Gwei (vs today where we regularly see gas prices of 100 Gwei or more), this transaction would cost 0.000021 ETH.
Everyone has been talking about gas price since the summer of 2020, when DeFi exploded. When more people are competing or bidding to get their transactions confirmed, gas prices go up–like in an auction. Since the DeFi app or protocol will require a predetermined amount of gas–it’s the gas price you bid that determines the maximum amount of ETH you pay as network fees.
- Gas price represents how much ETH you’re willing to pay per gas
- When you send a txn, you specify the gas price in Gwei per Gas (where 1 Gwei equals 0.000000001 ETH)
- The total fee paid equals (gas price x gas used).
So if you understand that gas price is the one variable you can set to pay more or less ETH for transaction fees on Ethereum, you can start to master how to save money on gas in Defi.
3 tips for how you can beat gas price:
- Before clicking confirm on any transaction, check gasnow.org because the prices are fluctuating in real time based on a kind of auction-like bidding among those submitting transactions on Ethereum (including DeFi apps). Gasnow.org or Etherscan Gas Tracker or EthGasStation.info–all of them tell you in real time an estimated amount of time to confirm your transaction based on how high or low of a gas price you pay.
- Leverage L2-powered apps whenever possible. As of today, we know that Synthetix, Uniswap, and Curve are all building with L2 solutions, which should enable transactions to happen in a few hundred milliseconds and for pennies per transaction. But thankfully there are a few options, like Loopring–an L2-powered DEX, AMM, and Ethereum wallet that trades at 2000 transactions per second. [show off this link to see Loopring Exchange]
- Be patient. In most cases, unless you’re trading on an AMM and your transaction has to confirm before the market rate changes, most DeFi related transactions can sit for longer at lower gas prices while you wait for it to confirm. Becoming familiar with how to drop/replace a transaction using this video by DeFi Dad can save you lots of time and trouble unsticking a pending transaction with too low of a gas price.
Gas is never a topic of joy within the DeFi and Ethereum community, but by learning and understanding the auction-like bidding process to set gas prices, one can save lots of money over time. A simple rule of thumb is: if your Ethereum transaction confirms immediately, you overpaid. Find ways to reduce your gas costs so you can let that money earn passive income in other DeFi applications.