I read in the literature that the limit for a Solidity transfer function is 2,300 gas units, because it prevents possible threats like reentrancy, etc.

However, I cannot understand why exactly 2,300 gas units are used. In my understanding, the dangerous instructions are SSTORE(that costs 20000 or 5000 gas units), SELFDESTRUCT (5000) and the different CALLS instructions (e.g., the CALL instruction requires 700 gas units + cost for each provided argument).

I did not find a (mathematical) justification for this imposed limit.

  • 2
    this value was empirically found during a long history of spam attacks
    – Nulik
    Sep 21 '18 at 10:50

Your concern is valid and Ethereum Improvement Proposal(EIP) is created regarding the same.

You can track it using the following link-


  • 1
    Thank you for the reference, do you have any idea about the rational for the gas limit of 2,300 gas?
    – Briomkez
    Sep 21 '18 at 10:35
  • 1
    The only rationale I know is to avoid reentrancy attack. Sep 21 '18 at 10:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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