Wrong maxMembers update on updateDAOMembership() function may cause wrong value for maxMembersin DAO
External caller have an ability to update the configuration of the DAO by calling updateDAOMembership(). It resets the global state variable and overwrite the new configurations into it. While calculation of the maxMembersit's using summation for all the new tier configuration indexes.
Now, maxMemberslocal variable is holding the exact correct max member attribute but while updating, it only updates the dao.maxMembersif the new variable is higher than old one.
In conclusion, if we reduce the total number of members, it will still hold the old value which is incorrect in this situation.
Current configuration, there are 3 tiers in DAO and each of it has 100 members. So we can have 300 members in total
We don't have any user on tier 1 and we want to remove tier 1.
After removal it won't update the max members attribute
Low - Because it doesn't affect the protocol that much. While checking the limit of tiers, we use amountparameter in tiers. So, we can still check the correct max members but in state variables it will store the wrong value.
Manua Review
We can directly set the new maxMembersattribute. It will store accurate value.
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.