The updateDAOMembership
function in the MembershipFactory
contract contains a critical vulnerability where reducing the number of tiers can result in loss of token state tracking while the tokens remain in circulation. This creates a permanent mismatch between the recorded state and actual token distribution.
The vulnerability exists in the following code section:
The vulnerability stems from:
No validation of existing tokens in tiers being removed
Destructive state update pattern using delete
Assumption that tiers can be safely removed without token consideration
Step-by-Step Breakdown:
The function receives new tier configurations that can be shorter than existing tiers
It only preserves minted values for tiers that will continue to exist
The entire tiers array is deleted with delete dao.tiers
New tiers are added with preserved minted values only for continuing tiers
Any tokens minted in removed tiers are no longer tracked but remain valid
Example:
The contract loses track of minted tokens in removed tiers and tokens continue to exist but are no longer tracked. Also DAO configuration no longer reflects actual token distribution.
Manual Review
Apply the following idea:
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.