The _refundETH function uses the transfer method to send Ether to the recipient. While transfer is simple and often sufficient, it imposes a 2300 gas limit on the recipient, which can fail if the recipient's fallback function exceeds this gas limit. Replacing transfer with .call is a best practice, as it avoids gas limit issues and aligns with modern Solidity recommendations.
Root Cause: The _refundETH function uses transfer, which imposes a fixed gas stipend of 2300 gas for the recipient's fallback function. This may lead to failures if the recipient requires more gas for execution.
Expected Behavior: The refund should succeed as long as the recipient address is valid and can receive Ether.
Current Behavior: The use of transfer introduces the risk of the refund failing if the recipient's fallback function has non-trivial logic or interacts with other contracts.
While it does not directly compromise security, it can cause operational issues by preventing funds from being refunded to valid addresses due to gas limit restrictions.
Manual code review
Foundry for testing
Replace transfer with .call in the _refundETH function:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.