Gas Fees

Gas is a unit that measures the computational effort required to execute operations on the network. Each transaction requires a certain amount of computational resources, which must be compensated to prevent the network from being overloaded by spam or stuck in infinite loops.

Gas fees cover the cost of these computations. The gas fee for a transaction is calculated by multiplying the amount needed for the operation by the cost per unit of gas. Significantly, this fee is charged whether the transaction succeeds or fails, ensuring that resources used in processing the transaction are accounted for.

Gas fees are essential for maintaining the health and efficiency of the network. They incentivize miners to process transactions and secure the network while deterring malicious actors from abusing the system.

The gas fee is the amount used to do some operation multiplied by the cost per unit of gas. The fee is paid regardless of whether a transaction succeeds or fails.

A diagram showing where gas is needed in EVM operations

Gas fees have to be paid with the cryptocurrency of the blockchain network. Gas prices are usually quoted in gwei, a denomination of NEPH. Each gwei is equal to one-billionth of an NEPH(0.000000001 NEPHor 10-9 NEPH). Instead of saying that your gas costs 0.000000001 NEPH, you can say your gas costs 1 gwei.

The word 'gwei' is a contraction of 'giga-wei', meaning 'billion wei'. One gwei is equal to one billion wei. Wei itself (named after Wei Dai, creator of b-money) is the smallest unit of NEPH.

What is a gas made of?

A transaction must spend gas to the network to integrate it into the EVM's submission and validation transaction procedure. The transaction operator can customize the gas, which will play a role in how the validators will prioritize the event. The higher the gas fees; the higher is the commitment of validators to prioritize the transaction.

The total gas is divided into the base fee and the priority fee.

Base fee

Every block has a base fee that acts as a reserve price. To be eligible for inclusion in a block, the offered price per gas must at least equal the base fee. The base fee is calculated independently of the current block and determined by the blocks before it, making transaction fees more predictable for users. When the block is created, this base fee is "burned," removing it from circulation.

The base fee is calculated by a formula that compares the size of the previous block (the amount of gas used for all the transactions) with the target size. If the target block size is exceeded, the base fee will increase by a maximum of 12.5% per block. This exponential growth makes it economically non-viable for block size to remain high indefinitely.

Block Number
Included Gas
Fee Increase
Current Base Fee

1

15M

0%

100 gwei

2

30M

0%

100 gwei

3

30M

12.5%

112.5 gwei

4

30M

12.5%

126.6 gwei

5

30M

12.5%

142.4 gwei

6

30M

12.5%

160.2 gwei

7

30M

12.5%

180.2 gwei

8

30M

12.5%

202.7 gwei

Following the table above - to create a transaction on block number 9, a wallet will let the user know with certainty that the maximum base fee to be added to the next block is the current base fee * 112.5% or 202.7 gwei * 112.5% = 228.1 gwei.

It's also important to note that it is unlikely to see extended spikes of full blocks because of the speed at which the base fee increases preceding a full block.

Block Number
Included Gas
Fee Increase
Current Base Fee

30

30M

12.5%

2705.6 gwei

...

...

12.5%

...

50

30M

12.5%

28531.3 gwei

...

...

12.5%

...

100

30M

12.5%

10302608.6 gwei

Priority fee (tips)

The priority fee (tip) incentivizes validators to include a transaction in the block. Without tips, validators would find it economically viable to mine empty blocks, as they would receive the same block reward. Small tips give validators a minimal incentive to include a transaction. For transactions to be preferentially executed ahead of other transactions in the same block, a higher tip can be added to try to outbid competing transactions.

How to calculating gas fees in practice

Let's say Jordan has to pay Taylor 1 NEPH. A NEPH transfer requires 21,000 units of gas, and the base fee is 10 gwei. Jordan includes a tip of 2 gwei. The total fee would now be equal to:

total_fee = units of gas used * (base fee + priority fee)

i.e. 21,000 * (10 + 2) = 252,000 gwei (0.000252 NEPH).

When Jordan sends the money, 1.000252 NEPH will be deducted from Jordan's account. Taylor will be credited 1.0000 NEPH. The validator receives the tip of 0.000042 NEPH. The base fee of 0.00021 NEPH is burned.

You can explicitly state how much you will pay in priority fee. However, most wallet providers will automatically set a recommended priority fee to reduce the amount of complexity burdened onto their users.

What is the gas limit?

The gas limit refers to the maximum amount of gas you are willing to consume on a transaction. More complicated transactions involving smart contracts require more computational work, so they require a higher gas limit than a simple payment. A standard NEPH transfer requires a gas limit of 21,000 units of gas.

For example, if you put a gas limit of 50,000 for a simple NEPH transfer, the EVM would consume 21,000, and you would return the remaining 29,000. However, if you specify too little gas, for example, a gas limit of 20,000 for a simple NEPH transfer, the EVM will consume your 20,000 gas units attempting to fulfill the transaction, but it will not complete. The EVM then reverts any changes, but since the validator has already done 20k gas units worth of work, that gas is consumed.

Although a transaction includes a limit, any gas not used in a transaction is returned to the user (i.e. max fee - (base fee + tip) is returned)

Why can gas fees get so high?

High gas fees are due to the popularity of Ethereum and then, in Nephele. If there's too much demand, users must offer higher tip amounts to try and outbid other users' transactions. A higher tip can make your transaction more likely to get into the next block. Also, more complex smart contract apps might be doing lots of operations to support their functions, making them consume a lot of gas.

Initiatives to reduce gas costs

The Falshback scalability upgrades should ultimately address some of the gas fee issues, enabling the platform to process thousands of transactions per second and scale globally.

Layer 2 scaling is a primary initiative to greatly improve gas costs, user experience and scalability. More on layer 2 scaling.

Monitoring gas fees

If you want to monitor gas prices, so you can send your NEPHfor less, you can use many different tools such as:

  • TBD

  • TBD

Further reading

Last updated

Was this helpful?