You are viewing a single comment's thread from:

RE: Ethereum "Gas" - How it Works

in #ethereum7 years ago

So I came here expecting to learn about gas price and gas limit but it still seems confusing. Why the separation of the two? Why not have just one fee? I can add much gas and pay little for it or add little gas and pay a fortune for it. What is the difference exactly?

Sort:  

Gas itself exists to accurately represent computational work. Ether, and thus value, is not a good measurement of this work because the value is so volatile. Can you imagine if there was a flat fee in Ether that you paid for transactions, and it was set when Ether was $10? Why would you pay 50x more for the same work just because Ether is worth more?

You need gas so that somebody doesn't write code to execute an infinite loop that would stall the blockchain. You need gas so that each individual opcode in the EVM can be accurately weighted proportionally to electrical costs (or other costs such as storage) of performing the operation.

The actual fee is up to the free market to determine via gas price, but the computation is a set amount and needs a separate unit to be represented in.