Recently, a friend asked me why transferring funds on the blockchain costs money. This is actually a great question, because gas fees are indeed a common issue for many beginners.



Simply put, a gas fee is the “fee” you have to pay for doing anything on the blockchain. No matter whether you’re transferring funds, executing a contract, or launching a DApp, miners spend computing resources to verify your transaction, so they charge a fee. This cost is not only a reward for miners, but also a mechanism to prevent spam transactions. Different chains use different tokens to pay for it—for example, Ethereum uses ETH, and BNB Chain uses BNB.

What’s interesting is that even if your transaction ultimately fails, you still have to pay the gas fee. Because miners have already spent computing resources to verify and execute your transaction, the cost is still the cost.

So why are gas fees sometimes especially expensive? There are mainly two reasons. First, how complex the action you’re doing is. For example, if a transaction involves multiple operations, it will generate a higher gas fee. Second, network congestion. When there are especially many transactions on-chain, miners prioritize packaging the transactions that are willing to pay higher gas fees, so they can earn more. That’s why gas fees tend to spike during peak times, which can be really frustrating.

Want to know how gas fees are calculated? There’s a simple formula: **transaction fee = Gas Limit × Gas Price**.

**Gas Price** is how much money you’re willing to pay per unit of gas. On Ethereum, **Gwei** is usually used as the unit. **1 Gwei = 0.000000001 ETH**. If you set the Gas Price to **20 Gwei**, that means you’re spending **0.00000002 ETH** per unit of gas. Want to speed up your transaction? Just increase the Gas Price. Want to save money? Lower it.

**Gas Limit** is the maximum number of gas units you’re willing to spend on this transaction. The standard Gas Limit for a basic transfer is **21000**. The purpose of this limit is to prevent contracts from consuming unlimited resources if something goes wrong. But note that Gas Limit can’t be set too low—otherwise the transaction may fail due to **Out of Gas**, and you still have to pay the failed transaction’s gas fee. If the transaction succeeds and the actual amount of gas consumed is less than the limit, you only pay for the portion actually used.

The fuel analogy makes it the clearest. Gas Limit is like how many liters of fuel your car needs. Gas Price is like the price per liter of fuel. If it takes **21000 liters** to drive from Taipei to Kaohsiung, and each liter costs **20 yuan**, then the fuel cost is **21000 × 20 = 420000 yuan**. Ethereum works the same way: if the Gas Limit is **21000** and the Gas Price is **20 Gwei**, then the fee is **21000 × 20 Gwei = 420000 Gwei**, which equals **0.00042 ETH** when converted to ETH.

When sending ETH in MetaMask, the confirmation screen shows the estimated gas fee, and you can choose to adjust it. After submitting, you can look up the final gas fee on **Etherscan** using the **Transaction Hash**.

In practice, setting the gas fee depends on your needs. If you’re in a hurry, setting a higher Gas Price lets your transaction get prioritized. If you’re not in a rush, setting a reasonable Gas Price is enough. Once you understand the logic behind gas fees like this, on-chain operations won’t feel so passive.
ETH1.82%
BNB0.51%
View Original
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • Comment
  • Repost
  • Share
Comment
Add a comment
Add a comment
No comments
  • Pin