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.