[Ethereum] ‘default’ gas price and does it change when price of ether relative to fiat rises

gasgas-price

I understand how gas pricing works, so that is not my question.

My question is, as the price of ether relative to fiat (US $) rises, does the 'default' gas price lower (if there is such a thing as the default gas price)?

In other words, three months ago, when ether was priced at $7.50 US$ and a transaction cost X gas (which would translate to Y dollars), would that same transaction cost twice as much today (if ether is at $15.00 US).

I understand that I could send less gas, but that is not the same thing as the default sent gas lowering.

Best Answer

Yes, there is a default gas price in the clients. For Geth, its gas price oracle (Gpo) has nothing to do with fiat.

https://github.com/ethereum/go-ethereum/blob/master/cmd/utils/flags.go is Geth's code for the default gas price:

GpoMinGasPriceFlag = BigFlag{
    Name:  "gpomin",
    Usage: "Minimum suggested gas price",
    Value: big.NewInt(20 * params.Shannon),
}

The Gpo code is at:

https://github.com/ethereum/go-ethereum/blob/master/eth/gasprice/gasprice.go

In short, Geth's Gpo looks at how full previous blocks have been, to determine the direction of the gas price (see How does "Gas Price Oracle" work?). If blocks are full, the Gpo will adjust the gas price upwards even if ETH has increased in fiat terms.

Related Topic