Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: low
Invalid

The winner may not be able to collect eth when gas prices are high and the contract could be stuck in CALCULATING state until gas prices come down

The winner may not be able to collect eth when gas prices are high and the contract could be stuck in CALCULATING state until gas prices come down

The last step in fulfillRandomWords is the send call which is supposed to send eth to the winner's contract

Root cause:

send(recent_winner, self.balance)

The problem is that the 3rd parameter gas defaults to 0 as per the docs (snippet below). So this may cause the transaction to revert and the contract will stuck in RaffleState.CALCULATING stage until the gas prices come down

send(to: address, value: uint256, gas: uint256 = 0)→ None
The amount of gas (the “stipend”) to attach to the call. If not set, the stipend defaults to 0.
Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement
heavenz52 Submitter
over 1 year ago
inallhonesty Lead Judge
over 1 year ago
inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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