The upgradeTier function in the MembershipFactory contract allows users to upgrade their tier membership without verifying if there's available space in the target tier. While it checks if a higher tier exists, it fails to validate if that tier has reached its capacity, potentially leading to tier overflow issues.
In the upgradeTier function, there is a check to ensure the target tier exists, but unlike the joinDAO function, it doesn't verify if the target tier has available capacity:
For comparison, the joinDAO function properly implements this check:
The lack of capacity checking in upgradeTier can lead to several issues:
Tiers can exceed their intended maximum capacity
DAO governance power could be incorrectly distributed
Violation of the DAO's membership structure and rules
Manual code review
A DAO is created with the following tier structure:
Tier 5: Capacity of 100 members
Tier 4: Capacity of 50 members (higher tier with more privileges)
Initial state:
Tier 5 has 50 members
Tier 4 is at capacity (50 members)
Attack path:
Result:
Tier 4 now has 51 members, exceeding its maximum capacity of 50
This breaks the tier structure design and the DAO's tokenomics
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.