Users can call MembershipFactory::upgradeTier and upgrade tiers even if the tier they are upgrading to is already full
The MembershipFactory::upgradeTier function lacks validation to check that the tier the user is upgrading to is already full, furthermore it doesnt update the minted state which should increase with each user added to the tier.
This also means that a tier can reach the full amount of users it's configured to have by users calling upgradeTier but more users can still join thorugh MembershipFactory::joinDAO because the minted state of the tier has not been updated.
PoC:
This test can be included in the "Upgrade Tier" tests in the test/MembershipFactory.test.ts file.
More users can join a tier than the maximum amount the tier is configured to have.
Users can exploit this vulnerability to circumvent restrictions put in place in the MembershipFactory::joinDAO function.
Hardhat tests and manual review
Add to upgradeTier a require statement similar to what you have in the joinDAO function:
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.