The upgradeTier
function in the MembershipFactory
contract contains improper logic that causes users to be downgraded to a lower membership tier instead of being upgraded to a higher tier. This issue is due to incorrect index manipulation, which leads to unintended tier changes for users in sponsored DAOs.
The upgradeTier
function is intended to move a user from their current membership tier (fromTierIndex
) to the next higher tier. However, the logic mistakenly subtracts 1 from the fromTierIndex
when calling the mint()
function, which results in a downgrade rather than an upgrade.
The line that mints a new tier subtracts 1 from the current tier index (fromTierIndex - 1
), which results in a downgrade.
Users attempting to upgrade are mistakenly given a lower-tier membership.
poc
Downgraded Membership: Users trying to upgrade their membership are downgraded to a lower tier, losing access to higher-tier benefits.
User Frustration: The issue can lead to user dissatisfaction, as users may end up with unintended tier downgrades, especially if they paid for an upgrade.
Potential Financial Loss: If there is a fee associated with upgrading membership tiers, users may lose funds without receiving the expected higher-tier benefits.
Manual Code Review
Fix the Tier Upgrade Logic: Update the mint()
function call to correctly upgrade users to the next higher tier:
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.