2

This question already has an answer here:

What benefits exactly we get from using gas in the network and why do we need it?

marked as duplicate by Waqar Lim Jun 3 '16 at 8:07

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1

Gas is used as an ETH independent unit of accounting.

It let's you define how much a certain operation in the EVM (Ethereum Virtual Machine) should cost in relation to each other. In this sense it is a cost structure.

The benefit is to decouple the incentive structure for cheap opcodes from a certain price. If the value of ETH increases, miners can choose to lower their demand for fees in ether smoothly. So with this, a mining fee market can always adapt to ETH valuation.

  • 1
    So who determines the gas price? – varDumper Jun 3 '16 at 8:26
  • The user that sends a transaction to a contract can pick any gas price, but the miners don't have to accepted it. It is a market. – Roland Kofler Jun 3 '16 at 8:28
  • 1
    You mean the miners pay the price and the sender benefits from it? Or it is exactly the other way? excuse me if this is a dumb Q – varDumper Jun 3 '16 at 8:31
  • No the sender proposes a gasPrice he has to pay. The miner can accept it or refuse it because it is too low. There is a default gas price of 10 Szabo currently. 1 ETH is 1 million Szabo. – Roland Kofler Jun 3 '16 at 8:37
  • 1
    Ok, so at the end it's the miner who benefits from the gasPrice right? – varDumper Jun 3 '16 at 8:39
1

Ethereum is essentially a single Quasi Turing-complete computer, capable of computation just like any other computer, except for every instruction executed, there must be something expendable known as gas. Gas is essentially a limited resource required to run computation to ensure that every contract will halt/terminate and did not cause Denial of Service.

tl;dr Ethereum Developers' solution for halting problem.

  • 1
    This couldn't be done using Ether? Why bother to introduce another factor? – varDumper Jun 3 '16 at 8:05
  • Gas is priced in ether. – comepradz Jun 3 '16 at 8:22

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