The updateDAOMembership function fails to account for recent burns and mints when updating tier configurations, leading to an inaccurate calculation of maxMembers When users burn tokens in one tier to mint tokens in another, these changes aren't reflected in the updateDAOMembership function, which copies outdated minted values and calculates an incorrect maximum membership
The vulnerability lies in the handling of the minted values for each tier during the updateDAOMembership process:
lets see how this works:
Dao minted only 1 tokenId_0 and 2 tokenId_1
member wants to burn 2 tokenId_1 to get 1 tokenId_0
he calls upgradeTier and burn 2 toeknId_1 and mint 1 tokenId_0
updateDAOMembership is called EXTERNAL_CALLER to updated tierConfigs
in loop this execute tierConfigs[i].minted = dao.tiers[i].minted; which has the old values because not updated.
now wrong values will be stored in dao.tiers.push(tierConfigs[i]); maxMembers += tierConfigs[i].amount;
POC:
the number of maxMembers will return wrong value any one who calls tiers function to see Tiers info he will get wrong tiers minted numbers which can effect the DAO who calls this to see how tiers information.
Update dao.tiers[i].minted value after calling upgradeTier
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.