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?

eth
  • 85,679
  • 53
  • 285
  • 406
sfrj
  • 782
  • 1
  • 8
  • 12

2 Answers2

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.

Nick Johnson
  • 8,144
  • 1
  • 28
  • 35
10

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

bamos
  • 1,944
  • 3
  • 12
  • 13