Skip to main content

What Are the Gas Limitations of the Transfer Function in Solidity?

The transfer function is a safer way to send Ether than call because it limits the gas forwarded to the recipient's contract to a fixed 2,300 gas stipend. This low gas limit is generally insufficient for the recipient to execute a complex re-entry attack logic, effectively mitigating the risk.

However, this low limit can also be a problem if the recipient is a contract that needs more gas for its fallback function.

How Does Increasing Implied Volatility Affect the Delta of an OTM Option?
Are There Scenarios Where the Checks-Effects-Interactions Pattern Is Insufficient?
Do Reentrancy Guards Protect against Both Single-Function and Cross-Function Attacks?
How Do Solidity Modifiers like Nonreentrant Implement the CEI Principle?