Potential Data Loss in updateDAOMembership When Reducing Tier Configurations
In the updateDAOMembership function, when the new tierConfigs array has fewer entries than the existing dao.tiers, the logic attempts to preserve minted values for the overlapping tiers. However, this approach does not address the potential loss of data for tiers that are removed.
The loop in the updateDAOMembershi function copies minted values from dao.tiers to tierConfigs for indices that exist in both arrays. This ensures that minted values are preserved for tiers that remain.
Tiers that exist in dao.tiers but not in tierConfigs are effectively removed, along with any associated data, such as minted values or other tier-specific information.
The function does not provide a mechanism to archive or handle data from tiers that are no longer part of the configuration.
When the updateDAOMembership function adjust tier configurations, it may ignore existing tiers if dao.tiers contains more tiers than tierConfigs. This can result into loss of minted data for extra tiers and also members who acquired tokens in the extra tiers may lose their membership status or benesits, as these tiers are no longer recognized. This discrepancy can cause significant confusion, especially if the users still hold tokens associated with unrecognized tiers.
Manual Review
Implement checks that prevent updates from proceeding if tierConfigs have fewer tiers than dao.tiers (unless explicitly allowed) or notify DAO members if an update will exclude certain tiers so they ca prepare for potential impact.
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.