Blockchains are made up of blocks of transactions, and each block has a limit to the amount of information it can contain. Users must pay what’s known as a gas fee to validators for their transaction to be included within a block.
All transactions take up some block “space”, measured in gas units. Simple transactions, such as transfers, use less gas than more complex ones, such as swaps, and are therefore cheaper at any given time.
However, the gas fee also depends on the current ‘gas price’ which varies according to how busy the network is. Current gas prices can be tracked here.
On Ethereum, gas fees are always paid in Ether (ETH), other networks tend to use their own native token. In order to submit a transaction, an address must contain enough ETH to pay the gas, in addition to any other cryptocurrency being used.
The fee for each transaction is the total gas units used multiplied by the gas price, and tends to be many orders smaller than one whole Ether. Gas fees are usually referred to in terms of Gwei, or 10^(-9) Ether.
i.e. 1 Gwei = 0.000000001 Ether
A good way to think about gas is to picture it as the fuel necessary to power a transaction. When a smart contract is published, the gas is calculated for every computational step written in the code, according to its complexity. The fact that every transaction on the blockchain costs something to pass, deters potential bad actors from abusing the system by overloading it with large numbers of malicious transactions or spam. Spam transactions are much more common on cheaper blockchains.
In August 2021, a governance proposal to the Ethereum network EIP-1559 was implemented, changing the mechanism of gas pricing on the network. The gas price is split into two components, the ‘base fee’, which varies according to overall network demand, and a ‘priority fee’ which works as a tip to encourage validators to process the transaction quickly.
While the priority fee goes directly to validators, the base fee is burned, taking the ETH out of circulation. This has the effect of reducing inflation, and in fact, during times of heavy usage, ETH becomes deflationary.