0

I have been working on a smart contract that batch transfers ETHs to multiple addresses provided. One thing i have noticed is that estimated gas limit for same addresses is higher (almost double) when there is no transaction so far against those addresses, reference transaction. if addresses have some transactions already there then the gas limit decreases to half, reference transaction.

My question is:

  • does it gas limit really depends on if an address has any transactions already ?

Any guidance will be much appreciated.

1 Answer 1

0

This is due to the G(newaccount) (~25k? gas not sure if changed) which is called to initialize new accounts. Below is a few ss from the pdf document I linked below for disperse.app which is popular for batch transfers.

Although it mainly covers ERC20 transfers, there's a section regarding native eth transfers as well and its relevant opcode/gas breakdowns which I believe is relevant to your question. Hope it helped!

ERC20/token transfers

Native transfers

A good reference for understanding gas optimizations and the opcode breakdown more detailed related to transfers is documented in the link below. https://disperse.app/disperse.pdf

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.