Sorry for the newbie question.

So i had 2 different transactions with the same gas price and same function called

But it used different amount of gas unit (not gas price)



Is there any factor which affect gas cost, or any method or equation to estimate this?

1 Answer 1


The gas cost depends on what the executed transaction/function does. If for example Tipsy Santa charges fees on transfer of token, it will be more expensive (gas-wise) to swap it, as the transaction will do additional calculations.

  • So does it mean calling the same function for buying on the same token, will cost a same and fixed gas cost between the two transactions?
    – John Wick
    Nov 15, 2021 at 17:20
  • Not always, it depends what the function does. For example somebody might code a function that uses 1000 gas when you first use it, but will cost 20000 gas when you call it for the second time. Nov 16, 2021 at 4:00

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.