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

Token Id pushed multiple times

Summary

Token Id pushed possibly multiple times as part of the vote count

Vulnerability Details

Token ID being pushed into _tokenIds array whenever a vote for the token Id is counted

Impact

Counting votes and deciding the winner will be very gas consuming since the _tokenIds array will be much longer than required

Tools Used

Manual review

Recommendations

Do a check whethertokenId is already in the _tokenIds array before pushing

replace line 51 with:

if(voteCounts[tokenId]==1) {
_tokenIds.push(tokenId);
}
Updates

Lead Judging Commences

bube Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Unbounded arrays

Support

FAQs

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