17

I'm a bit new to ethereum and I'm finding it a bit difficult to understand how gas and Ether relate.

So every call we do to a smart contract costs gas. Where does the gas that the user pay goes to? Does it evaporate, or is it credited to some other account?

2 Answers 2

19

Gas is paid for out of the sender's ether balance, at the rate specified by the chosen gas cost. Any unused gas is refunded, and consumed gas is credited to the miner who mined the transaction, again at the rate specified by the gas cost.

3
  • 2
    Fun fact: back in the old days (early 2014) we used to consume gas. Pollution all around!
    – Jeffrey W.
    Apr 14, 2016 at 11:02
  • Might be worth to mention that gas is paid with ether.
    – q9f
    Apr 14, 2016 at 11:03
  • 1
    @5chdn The user isn't asking where gas comes from, though. Apr 14, 2016 at 11:04
10

Gas consumed x Gas price = transaction fee. The transaction fee is paid to the miner of the block similar to Bitcoin.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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