MyCut

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

Duplicate Player Handling in Constructor of `Pot.sol`

Summary

The constructor in Pot.sol does not handle duplicate players in the input array, which can lead to reward distribution discrepancies.

Vulnerability Details

In the Pot contract’s constructor, duplicate player entries in the input array are only counted once. This could cause issues in cases where multiple entries for the same player are expected.

Impact

Players might expect multiple rewards based on their multiple entries but will only receive one, potentially causing disputes.

Tools Used

Manual code review.

Recommendations

Either prevent duplicate entries or update the logic to handle multiple entries for the same player to ensure appropriate reward distribution.

Updates

Lead Judging Commences

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

incorrect handling of duplicate addresses

Support

FAQs

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