Beginner FriendlyFoundryGameFi
100 EXP
View results
Submission Details
Severity: high
Valid

Collected rewards getting a clean slate after each reward receival.

Summary

Collected rewards is getting reassigned instead of being updated

Vulnerability Details

_collectedRewards[msg.sender] only reflecting the previous rewards he's redeemed, and not the whole rewards collected based on token balance.

Impact

This would lead to the user being able to receive more HealthTokens than his proper share.

Tools Used

Manual review

Recommendations

Update _collectedRewards[msg.sender] = amountRewards; with _collectedRewards[msg.sender] += amountRewards;

Updates

Lead Judging Commences

bube Lead Judge
over 1 year ago
bube Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

_collectedRewards is not updated correctly

Support

FAQs

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