Christmas Dinner

First Flight #31
Beginner FriendlyFoundrySolidity
100 EXP
View results
Submission Details
Severity: medium
Valid

use of "transfer" opcode to send ETH

Vulnerability Details

in chirstmasDinner::_refundETH the .transfer opcode is used to handle ETH transfer, it does this by forwarding a fixed amount of 2300 gas. This is dangerous because

  • If the recipient is a a multisig safe, with a receive/fallback function which requires >2300 gas, e.g safes that execute extra logic in the receive/fallback function, the transfer function will always fail for them due to out of gas errors.

Impact

  • christamsDinner::refund function will always revert and user can't refund his deposit

Tools Used

  • IDE

  • Manual Review

Recommendations

Use the ".call" opcode instead and follow CEI pattern

Updates

Lead Judging Commences

0xtimefliez Lead Judge 10 months ago
Submission Judgement Published
Validated
Assigned finding tags:

transfer instead of call

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.