4

All the explanations I heard for the Gas usage, could imho also be dealt with in Ether directly. What is it that Gas does that couldn't be done with Ether directly?

0
3

It decouples the cost from the floating exchange rate of Ethereum to other currencies.

The gas cost is fixed and measures the computational workload. This does not change with the rising and falling value of Ether, much like the amount of fuel your car burns to get from point A to point B is indifferent to the price at the fuel point.

The gasPrice adjusts the cost as measured in funds, so if the price of ether happens to increase, then the price of gas can correspondingly decrease. Additionally, it solves for network congestion by allowing users to bid for priority.

Hope it helps.

2
  • 2
    Thanks for the answer, but isn't it also true that without the decoupling, if the price ETH/USD doubles, the miners competing for the transactions could lower the price for the transaction? With the coupling the cost also increases if the miners don't decrease the price for gas when the Ether goes up. right? Also users could offer more ether directly for priority. To me it seems that everything gas does could be done in Ether directly or what did I miss?
    – vladimir
    Apr 18 '18 at 5:55
  • I think the concept of gas is redundant and adds more complexity without any benefit. Gas is tied to the value of Ether and has no other utility. Users do have to calculate each time the cost of transactions in Ether and this invalidate the use of gas. Gas value increases and decreases equally with Ether's value, it's just like a symbolic link that can be easily removed from the equation.
    – Deniz
    Jan 7 '19 at 21:39
4

If EVM opcodes were priced in units of ETH, rather than units of gas, then there'd be no way to decouple the cost of a transaction from the USD value of ETH at a given point in time.

Without this decoupling, if the price of ETH/USD doubled, real the cost of performing a transaction would also double.

By implementing an abstraction - i.e. by pricing opcodes in gas (which is a unit of work) - and by allowing a market to form around the price of a unit of gas, you can protect the cost of running a transaction from fluctuations in the USD price of ETH.

Relevant: What is meant by the term "gas"?

3
  • Thanks for the answer, but isn't it also true that without the decoupling, if the price ETH/USD doubles, the miners competing for the transactions could lower the price for the transaction? With the coupling the cost also doubles if the miners don't lower the price for gas when the Ether goes up. right? Also users could offer more ether directly for priority. To me it seems that everything gas does could be done in Ether directly or what did I miss?
    – vladimir
    Apr 18 '18 at 5:52
  • 2
    Hi there. The miners could lower the price for the transaction, yes. But then the miners would need to know how the value of ETH had changed in relation to how the user was pricing it. Some users would be using USD as a base currency, some would be using EUR as a base currency, some would be using Dogecoin, etc., etc. These are all different markets, which themselves will have different values on different exchanges. So things start getting complicated. If the value of ETH against Dogecoin goes up massively, but simultaneously down against the USD, then what? Apr 18 '18 at 7:49
  • 2
    The idea of gas - i.e. the unit amount of work - also allows different operations inside the EVM to be compared relative to one another. One contract requires more work than another contract because it's more complex. If you remove this unit and just use ETH directly, and one person is willing to pay more ETH for a simple contract than someone is willing to pay for a complex contract, how can those 2 contracts now be compared in a quantified way? So this abstraction needs to be there to separate the EVM from the market-driven pricing structure used by network users. Apr 18 '18 at 7:50

Not the answer you're looking for? Browse other questions tagged or ask your own question.