The ChristmasDinner::_refundETH
function uses the transfer() which has a hard gas limit of 2300 gas to send ETH to the participant.
The ChristmasDinner::_refundETH
function uses the transfer()
method to send ETH to the participant.
However this is problematic because:
transfer()
has a hard gas limit of 2300 gas.
Smart contract wallets, for example, Gnosis Safe, typically require more than 2300 gas (simple transfer requires around 21,000 gas) to process incoming ETH.
Modern smart contract wallets commonly used as multi-sigs would fail to receive funds.
The operation would revert and the participant will not be able to withdraw their deposits.
Add the following GnosisSafeMock contract and test to the ChristmasDinnerTest .t.sol:
The test will revert with "[OutOfGas] EvmError: OutOfGas" error.
Participant will not be able to withdraw their deposit if the participant is a smart contract (Gnosis Safe, other smart wallets).
Manual review
Foundry
Replace the transfer()
function with the call()
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.