Что такое газ в криптовалюте

Blockchains need resources to function safely and smoothly. Where do these resources come from? From users who use platforms, make transactions, and perform other actions on blockchains.

Just as a car cannot move without fuel, blockchains cannot operate without gas, which refers to the fees paid by users. This article will explain what gas is in crypto trading, how it is calculated, and how it is used.

To learn more about digital currencies, their uses, how to profit from them, and how to safeguard your savings, see the article "Ins and outs of cryptocurrency."

How Ethereum works

Before we explain what gas is in cryptocurrency, let us look at how the Ethereum chain works since gas is used in this network to perform operations. Ethereum is a decentralized platform based on blockchain technology.

Ethereum was created after Bitcoin and opened new opportunities for users. In addition to transfers and payments, users could deploy smart contracts and decentralized applications (dApps). Later, other digital currencies and NFT tokens started to be created based on this platform.

на иллюстрации демонстрируется, как в блокчейне Эфириум совершаются транзакции

A gas fee is charged for every transaction in the Ethereum chain. It is the so-called "fuel" necessary for the operation. As the number of transactions in the chain grew, gas fees increased significantly.

Additionally, the waiting time for processing transactions also grew. To reduce this waiting time and gain priority in transaction processing, users had to pay higher fees, i.e., increase the reward for miners so they would prioritize their transactions.

As a result, in some cases, gas fees exceeded the value of the transaction itself. This, in turn, led to the creation of new chains that allowed transactions to be performed faster and cheaper than in the Ethereum network. To remain competitive, Ethereum started to evolve.

Initially, the Ethereum chain used the Proof of Work (PoW) consensus algorithm, the same as in the Bitcoin network. However, as the chain expanded, this algorithm began to limit its capabilities. Thus, the decision was made to transition to a Proof of Stake (PoS) mechanism, which was completed in late 2022.

Notion and purpose of blockchain fees

Blockchain fees are payments users should make to perform any actions: transferring digital assets from one user to another, launching smart contracts, developing decentralized applications, etc.

When discussing what gas is in cryptocurrency, the topic of fees cannot be overlooked, as they play an essential role in maintaining the operation of any chain. Fees ensure the continuous work of miners or validators, who are responsible for processing transactions and adding blocks to the network.

Generally, fees are paid in the blockchain’s native currency where the operation is conducted. For instance, if a transaction is made on the Bitcoin platform, fees are paid in BTC; if on Ethereum, they are paid in ETH, regardless of the currencies involved in the transaction.

The amount of the fee is influenced by two main factors: the complexity of the operation and the chain's load. The higher the complexity or the load on the network is, the higher the fee will be. Accordingly, the simpler the transaction or the lower the load is, the lower the fee is.

на изображении демонстрируется сравнение по показателю TPS между разными блокчейнами

Fees help prevent chain overloads and optimize the use of block space. Every blockchain has its own transaction throughput (TPS), which is the number of operations the network can process per second.

For blockchains like Ethereum or Bitcoin, these rates are relatively low, with 10 and 5 transactions per second, respectively. In newer chains, TPS can reach several thousand transactions per second. For example, the Solana chain can handle up to 65,000 TPS.

Gas in cryptocurrency

Now that we have briefly touched on the concept of gas in the Ethereum chain, let us explore it in more detail. Gas refers to the unit of measurement for the computational effort needed to perform an operation.

We started by discussing the Ethereum chain, so we will continue using this network as an example. The cost of each operation, i.e., the fee charged to the user, consists of two parts:

  1. A base fee, which is later destroyed (burned). This is typically done to maintain a balance between the supply and demand for a particular digital currency.
  2. A priority fee is the "tip" that miners (validators) receive to process the transaction. The minimum amount is set by the chain, but the maximum is not limited. As mentioned earlier, the higher this fee, the higher the priority of the transaction.
на иллюстрации демонстрируется, как майнеры выбирают из пула транзакции (в первую очередь с наибольшей ценой газа) и добавляют их в блоки

Generally, as the chain becomes more congested, the size of the fee also increases. Another important factor affecting the price of an operation is its complexity. The more complex the transaction is, the more gas it requires, leading to higher fees.

It is also important to note that to conduct any transactions on the Ethereum platform, the user must own the chain’s native currency – Ether (ETH) – since all transaction costs in the Ethereum network are paid only in this currency.

Moreover, users must pay for work even if the transaction is rejected or fails. Validators still verify the transaction, which requires computing resources, regardless of the outcome.

Why gas is used

In the Ethereum chain, gas fees are not only a measure of the computational resources used for transactions, but they also serve as a tool to protect the network from hacking attempts and spam. Let us discuss the purposes of gas in more detail.

Ether is not just a digital currency used for payments between users. As mentioned earlier, the Ethereum platform offers far more opportunities, such as deploying smart contracts and dApps.

Various applications can be launched on Ethereum in different fields, including gaming, search engines, and more. To launch a dApp or smart contract on this platform, users must pay a fee.

In addition to the fee for deploying smart contracts, users are also charged for calling various functions, such as transferring coins, recording data, and more.

Moreover, when issuing their own cryptocurrencies of the ERC-20 standard based on the Ethereum platform, a gas fee is also charged. Users must also pay gas fees when participating in ICOs (Initial Coin Offerings) or voting in DAO (Decentralized Autonomous Organization) governance.

на изображении демонстрируется взаимосвязь между платой за газ и временем обработки операций: платишь меньше – ждешь дольше, платишь больше – ждешь меньше

Gas fees play a crucial role in regulating supply and demand in the Ethereum chain. This is achieved because part of the fee paid by the user for a transaction is burned. This reduces the supply of Ether and increases demand for it.

Furthermore, during periods of high demand for ETH coins, the number of operations with them increases, leading to higher network congestion and, consequently, higher gas prices. Conversely, when demand falls, gas costs also decrease.

How gas is measured

To fully understand what gas is in cryptocurrency, it is necessary to understand how it is calculated and what it consists of. We already know that gas is used in blockchain as fuel for transactions, similar to gasoline for a car—without it, the car will not move.

In centralized finance, users do not pay separately for computing resources, but in decentralized platforms, this is exactly how it works. It is the use of these computing resources that allows transactions to occur.

в таблице демонстрируются деноминации Эфира, среди которых выделен Gwei, применяемый для измерения стоимости газа

The cost of gas is measured in Gwei (giga-wei), a denomination of Ether equal to 0.000000001 ETH. The price of a basic operation in the Ethereum chain is 21,000 gas units, or 0.000021 ETH. However, this is not the final amount of transaction costs.

As mentioned earlier, the fee consists of two components: the base and priority fees. For example, if a user needs to send 1 ETH to another user, and the base fee is 100 Gwei with an additional 10 Gwei as a tip, the total fee is calculated as 21,000 * (100 + 10). The result is 2,310,000 Gwei or 0.00231 ETH.

The sender will pay 1.00231 ETH, of which 1 ETH will be transferred to the recipient, the base fee of 0.0021 ETH will be burned, and the remaining 0.0021 ETH will go to the validator.

How fees are calculated

To calculate the total transaction costs, two concepts are used that are related to gas fees: the gas limit and the gas price. The total cost of a transaction is calculated by multiplying the gas limit by its price. Let us explore these concepts in more detail: what they mean and how they are calculated.

First, the gas limit is the maximum number of gas units a user is willing to pay for one transaction. Ideally, this value should be higher than what is actually required for the operation. Similar to fueling a car, we fill the tank a bit more than needed to travel a specific distance.

We have already mentioned that the gas limit for most standard operations in the Ethereum chain is 21,000. However, there are cases when more gas is needed, sometimes reaching several million units. This is necessary when the transaction is more complex and requires greater computing power.

на изображении демонстрируется, как происходит выставление двух основных параметров платы за газ: лимита газа и цены газа

The gas price is the cost of one unit of gas. A user can set this parameter manually depending on how fast they want their transaction to be verified. If a user wants their transaction to be processed and added to the block faster, they must pay more.

This is because validators include transactions in blocks randomly. However, if the gas price increases, their reward also increases, which makes them prioritize such transactions. A user can decide how urgently they want their transaction to be processed. If there is no rush, there is no point in overpaying for gas. Special automated programs, such as ETH Gas Station, can also help calculate the transaction fee.

How to reduce gas fees

Now that we have explored what gas is in cryptocurrency, how it is calculated, and what it consists of, the next important question is how to reduce gas fees. Let us discuss what opportunities exist for this.

Why does the gas price increase? This happens when users want their transactions to be processed first or during times when the chain is heavily loaded. As the number of transactions grows, so do the costs.

On one hand, the gas price in the Ethereum chain is set automatically, based on the current network load. However, many cryptocurrency wallets allow users to set fees manually by choosing the minimum amount.

It is important to understand that setting a lower fee will lead to slower transaction processing since validators prioritize transactions with higher fees, as that affects their earnings.

However, there are times when gas prices drop, usually at night or on weekends, when fewer transactions are processed, and the network is less busy. If users want to save on gas, they can make transactions during these periods.

на иллюстрации демонстрируется интерфейс одного из сервисов, на котором можно отслеживать изменения цены на газ

Special services allow users to monitor gas price changes and transaction speed at different times. Based on this information, users can choose the optimal balance between price and processing time in their time zone.

Another solution to reduce fees is using sidechains for transactions instead of the main Ethereum chain. These Layer 2 solutions can increase scalability, processing multiple transactions in parallel with lower fees.

Comparison of transaction fees across different networks

The popularity of the Ethereum chain is growing, attracting more users and increasing the number of transactions they make. However, during peak loads, the chain sometimes struggles to process transactions quickly, causing fees to rise significantly and transaction speed to slow down.

The blockchain is trying to address these issues by transitioning to a new consensus algorithm using sharding and implementing sidechains. However, competitors are offering faster transactions and lower fees to attract users.

Below is a table comparing transaction times and fees across major blockchains:

Blockchain Processing time Fee amount
1. Bitcoin 10-30 minutes $2.50
2. Ethereum 15-60 seconds $5-$50
3. Binance Smart Chain5-10 seconds $0.10-$0.20
4. Cardano5-10 minutes $0.10-$0.20
5. Solana1-2 seconds $0.00001-$0.0001
6. Polkadot3-6 seconds $0.01-$0.05
7. Avalanche1-2 seconds $0.10-$0.20

As shown, Ethereum has the highest transaction fees. Many of its competitors offer significantly lower fees and much faster transaction speeds. This is achieved through the use of innovative consensus mechanisms based on PoS (Proof of Stake), allowing multiple transactions to be processed simultaneously by several validator nodes.

However, security should not be overlooked. New platforms and cryptocurrencies emerge almost daily, but many either disappear quickly or turn out to be fraudulent schemes. It is important to be careful when choosing a network for transactions.

Future of gas fees

Now that we have explored various aspects of what gas is in cryptocurrency, let us consider its future. Will gas fees remain relevant for blockchains?

As mentioned earlier, fees in blockchains serve several important functions: ensuring security, motivating miners and validators, and maintaining the balance between currency supply and demand. At the same time, high gas fees are a major obstacle to using Ethereum for everyday transactions.

на изображении демонстрируются наиболее популярные способы снижения платы за газ

In some cases, the gas fee exceeds the amount of the transaction itself, making it unreasonable to use this network. This has led to the rise of new platforms offering more favorable conditions: lower fees and faster transaction processing.

Ethereum developers are responding by lowering transaction fees to stay competitive. Currently, Ethereum fees are at their lowest in the last six months. Many users see this as a signal to buy Ether.

Additionally, Ethereum founder Vitalik Buterin has proposed a new approach to gas pricing in the network. Instead of a one-dimensional pricing system, he suggests the concept of multidimensional pricing, meaning different pricing mechanisms for different resources.

Buterin's proposal to improve the chain number EIP-7706 introduces new gas types for specific operations, optimizing transaction processing. Each type of transaction will have base and priority fee rates for more efficient usage.

Conclusion

In this article, we explored blockchain fees, examined what gas is in cryptocurrency, and its purpose. Gas is the "fuel" that powers a blockchain, ensuring its security and enabling various actions within it.

We focused on the Ethereum network, as it is where gas fees are most actively used. All fees in this network consist of two parts: the base fee, which is burned, and the priority fee, which goes as a reward to validators.

Fees are paid in the chain's native currency, Ether. The base fee helps regulate Ether supply and demand by burning a portion of coins, reducing the total supply, and maintaining demand.

The priority fee allows validators to prioritize transactions. The more a user is willing to pay, the higher priority their transaction receives. However, fees are influenced by more than just user preferences.

Transaction complexity and the current chain load are key factors in determining fees. To reduce costs, it is recommended to transact when the network is less busy, typically at night or on weekends.