Ethereum Gas Price / Gas Limit Explained!!

When you send tokens, interact with a contract, send ETH, or do anything else on the blockchain, you must pay for that computation. That payment is calculated in Gas and gas is paid in ETH.

When you hear gas, the person is either talking about:

  • Gas Limit
  • Gas Price

The total cost of a transaction (the "TX fee") is the Gas Limit * Gas Price.

The gas limit is called the limit because it's the maximum amount of units of gas you are willing to spend on a transaction.

However, the units of gas necessary for a transaction are already defined by how much code is executed on the blockchain. If you do not want to spend as much on gas, lowering the gas limit won't help much. You must include enough gas to cover the computational resources you use or your transaction will fail due to an Out of Gas Error.

If you want to spend less on a transaction, you can do so by lowering the amount you pay per unit of gas. The price you pay for each unit increases or decreases how quickly your transaction will be mined.

Will increasing the gas price get it mined faster? Does setting a low gas price mean it won't ever be mined?
The transaction fees go to the miner who mines your block. When miners mine a block, they have to decide which transactions to include. They can choose to include no transactions, or they can choose to randomly select transactions. In order to encourage miners to include transactions in blocks you want to set a "Gas Price" that is high enough to make them want to include it (since it is entirely up to them).

Most miners follow a very simple strategy for inclusion. They include transactions they received sorted from highest Gas Price to lowest, then include them until either the block is full or they reach one that has a Gas Price set lower than they are willing to bother with.

You want to set the Gas Price high enough so that a miner includes your transaction in a block. If you are in a hurry, you can set the Gas Price higher, so that you jump ahead of everyone in line. If you are not in a hurry, you just need to set a number high enough so that someone eventually includes your transaction.

https://myetherwallet.github.io/knowledge-base/gas/what-is-gas-ethereum.html

Sort:  

Thanks for making this clearer to understand.

Congratulations @surryhillsteemer! You received a personal award!

1 Year on Steemit

Click here to view your Board of Honor

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations @surryhillsteemer! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Coin Marketplace

STEEM 0.29
TRX 0.21
JST 0.039
BTC 97652.91
ETH 3729.32
SBD 3.91