Just wondering which transaction would take to get mined, for example if two people sent a trade for the same token (not real values);

Person 1: gasLimit set to 100 and gasPrice set to 0.01, max tx cost = 1

Person 2: gasLimit set to 10 and gasPrice set to 0.10, max tx cost = 1

Would there be any difference in which transaction was mined? How do the miners choose which one to take, does it matter which one was submitted first?

1 Answer 1


If the gas cost is the same, the miners would be incentivized to mine the transactions with the higher gas price instead of the higher gas limit. Here's why:

  • The higher gas limit transaction can potentially reach the limit but it's not guaranteed and unused gas is refunded.
  • The block has a fixed gas limit, so the miner would miss on the opportunity to mine other transactions into the block if he quickly reaches the gas limit on the block.
  • The miner can process more transactions with lower gas limits into the block and collect more fees.
  • Perfect, thanks for that! Is there a way to estimate a good gasLimit to use, for example if I'm sending a transaction to etherdelta smart contract, what should I set it to? If I wanted to make sure my transaction were going to win, then I should set it as low as possible with a high gasPrice then correct?
    – Tim
    Jan 30, 2018 at 8:53
  • using web3.eth.estimateGas usually does a good job at estimating Jan 30, 2018 at 17:17

Your Answer

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

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