logoAcademy

Transaction Fees

Let's recap our knowledge on transaction fees in blockchains.

NFT collectors, DeFi traders, and blockchain gamers have independently spent significant sums to execute their transactions. These unrelated activities converge on the blockchain, competing for the finite capacity of the next blockspace. In an effort to avoid delays or being outpaced by others, participants can be compelled to pay substantial fees to secure prompt transaction processing.

But why are there transaction fees (also commonly known as gas fees) at all? Let's recap the reason for fees and how they work.

In the Ethereum Virtual Machine (EVM), transaction fees play a crucial role in regulating access to the limited processing resources within the blockchain network. The blockchain has a limit of how much computation it can process in a given time frame. Imagine the Ethereum network as a highway with lanes representing block space. Each transaction is like a vehicle that needs space on these lanes.

Now, just like on a highway during rush hour, if too many vehicles try to access the lanes at once, congestion occurs, slowing down the entire system. To prevent this congestion, Ethereum employs dynamic transaction fees. These fees keep users from issuing transactions during times of high demand, much like a flexible toll system on a highway. When traffic is light, the tolls remain low, allowing for smooth flow. However, as more vehicles (transactions) enter the highway (the blockchain), and it becomes congested, the tolls (transaction fees) rise.

When the transaction fees are high users will rethink the urgency or importance of their transactions, much like how drivers might reconsider their travel plans or opt for alternative routes when faced with higher tolls. Ultimately, this dynamic fee structure helps to maintain a balanced flow of transactions, preventing bottlenecks and ensuring the network operates efficiently even during periods of high demand.

These fees can vary quite significantly over time. The following chart is showing the 7-day average of transaction fees on Ethereum:

The Unit Gas

Not every transaction costs the same because they vary in complexity. Simple transactions, like sending tokens from one wallet to another have much lower fees than for example interacting with smart contracts executing complicated operations.

Going back to our highway analogy, think of having the highway operator charge different fees for motorbikes, cars and buses on the highway. Larger vehicles take up more space and require more effort to process, so they have higher fees.

Business Models of web3 dApps

These fluctuating fees can be a huge danger to the business model of many web3 dApps. Let's look at a simple example protocol, where users can swap two stablecoins:

The users using these dApps will face multiple fees. In our example the fee structure could look something like this:

In our example the users are paying three kinds of fees:

  • Transaction Fee: The fee to execute their transaction on the blockchain
  • Protocol Fee: A fee to the creator/owner of the stablecoin swap protocol
  • Liquidity Provider Fee: In this example we also include a fee for external liquidity provider. Many protocols incentivize external entities to participate in the protocol (by for example providing liquidity).

The users don't really care how the fees are split between the different parties involved in the execution of the swap. At the end of the day they are looking at the overall cost for their intention.

Some time passes now and the activity increases on the chain. The cause may be an NFT drop or a bull market. Due to rising activity and demand for the limited block space the transaction fees increase:

Even though nothing about the protocol has changed and the increased chain activity may not even affect you in any other way, much less users will use the protocol now.

Many blockchain ecosystems are working on isolating fees, meaning not having a single fee market for unrelated activities on the chain. In the coming section we will look at how Avalanche achieves fee isolation.

On this page

No Headings