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.