You are viewing a single comment's thread from:

RE: Ethereum "Gas" - How it Works

in #ethereum7 years ago (edited)

Clear and thorough explanation. Kudos to you!

Please correct me if im wrong. When gas limit is specified as 100 thousand and your transaction needs 1 you will pay the limit you have specified if your transaction fails. Unlike when it succeeds!? Why is that so?

Sort:  

The gas limit only specifies the max amount you're willing to pay. If the transaction gets mined, you only pay for the gas actually consumed. If it's mined, the transaction is technically successful (even if the results aren't what you wanted).

If it's not mined, then nobody did the computation, so nobody gets paid anything.