Mystery Box

First Flight #25
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: high
Valid

Possibility of Reentrancy Attack

Summary

The claimAllRewards and claimSingleReward functions are both susceptible to a reentrancy attack.

Vulnerability Details

Within both functions when a user claims, the value is sent to them via call() before the user's rewardsOwned state has been updated. If the claimer is a smart contract it can recursively reenter the function via fallback() or recieve().

Impact

This will allow the caller to deplete the contract of its entire token balance.

Tools Used

Manual Review

Recommendations

Use the check-effects-interactions pattern or the nonReentract modifier.

Updates

Lead Judging Commences

inallhonesty Lead Judge
about 1 year ago

Appeal created

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

`claimAllRewards` reentrancy

`claimSingleReward` reentrancy

Support

FAQs

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

Give us feedback!