I've wanted to write about this for a while, and I finally had some time to organize it today.

When transferring funds or making transactions on Ethereum, you'll always see a fee called Gas. This article explains how this fee is calculated and why it fluctuates.

$ETH is the native token for paying gas on the Ethereum mainnet. Currently valued at 2434.13 (24h +1%).

■ What exactly is Gas?

Gas is the unit of measurement used by Ethereum to measure computational workload. Each operation on the chain corresponds to a fixed gas consumption; a typical ETH transfer consumes 21,000 gas.

One important reason for charging based on computation volume is to prevent people from using operations like infinite loops to crash the network: the more computations done, the more you pay.

■ How are transaction fees calculated?

The transaction fee is roughly equal to the gas consumed multiplied by the gas price. The gas price is usually expressed in Gwei, where 1 Gwei equals 0.000000001 ETH.

After the London upgrade in 2021 (EIP-1559), the fee was split into two parts: a base fee and a tip (priority fee). The base fee is automatically adjusted by the protocol according to the rules and will be destroyed; the tip goes to the validator who packaged the transaction.

■ Why is it sometimes so expensive?

There is a limit to the amount of gas each block can hold. If more people want to use it, the block space becomes scarce, and the base fee will be adjusted upwards block by block according to the rules.

When popular projects are open for casting and prices fluctuate wildly, a large number of transactions come in at the same time, and transaction fees may rise to several times the usual amount.

■ How to avoid wasting money

If you're not in a rush, you can avoid peak traffic hours; many wallets also offer different fare levels for different speeds, so you can choose the one that suits your needs.

Small, frequent transactions can also be done on Layer 2: large numbers of transactions can be compressed and packaged before being written back to the mainnet, which reduces the cost per transaction.

Also, remember to keep some ETH in your wallet for transaction fees, otherwise other tokens may get stuck in your wallet and you won't be able to transfer them out.

■ In conclusion

Understanding gas won't make you more money, but it will save you from paying unnecessary fees and make it easier to spot anything amiss with a signature. Playing it safe is fine; survival is more important than making a big profit in one go.

Have any of you ever misunderstood this point before?