[Ethereum] How to determine the gas price mathematically

gasgas-price

The mathematical equation to define the gas price is gasprice = 1 gwei / gasused. The mathematical equation to define the tax to be paid for each transaction is tax = gasprice x gasused. Are these equations not redundant? If I use 41 000 gas, the gasprice will be approximately 2.43e-5, if I multiply that value by 41 000 the tax to be paid will be 1 Gwei. Would not that be redundant?

Best Answer

Gas price is not determined mathematically. It's determined by the people sending transactions. The transaction fee is computed, as you said, by gasprice x gasused.

Miner's interest is to earn as much as possible, so they tend to mine the transactions that have a higher gas price first.

The interests of the people that send transactions to the network is to have their transactions mined as fast as possible, for the lowest price possible. They can't modify the gasused, only the gasprice.

So, economically speaking, the more transactions are waiting to be mined, the higher the gas price will be.

You can check the ethgasstation.info website to make an impression about what's a decent gasPrice at the present moment.

Related Topic