Project

One World
NFTDeFi
15,000 USDC
View results
Submission Details
Severity: medium
Invalid

`require(daos[daoMembershipAddress].noOfTiers >= fromTierIndex + 1` can be bypass

Summary

the >= sign is chosen incorrectly, which leads to useless check in the upgradeTier() function.

Vulnerability Details

fromTierIndex is index which can be [0,1,2,3,4,5,6] as there can only be seven tiers. noOfTiersis presented in values [1,2,3,4,5,6,7]. Let's imagine that fromTierIndex = 6 and noOfTiers= 7. When checking require(daos[daoMembershipAddress].noOfTiers >= fromTierIndex + 1 .

The result of the check isfromTierIndex+1=7=noOfTiers.

The maximum allowable fromTierIndex may be 6.

Impact

an invalid tier will be added, which may lead to invalid behavior when calling the mint function

Tools Used

manual

Recommendations

use >instead >=

Updates

Lead Judging Commences

0xbrivan2 Lead Judge 9 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement
0xbrivan2 Lead Judge 9 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Appeal created

hajime Submitter
9 months ago
0xbrivan2 Lead Judge
9 months ago
0xbrivan2 Lead Judge 9 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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