Modifying the tier configurations through the updateDAOMembership function can disrupt the fixed weight assignments in the shareOf function, leading to inaccurate and unfair profit distributions among DAO members.
The shareOf function in the MembershipERC1155 contract calculates each member's share of profits based on a fixed weight mapping tied to specific tier indices:
This approach assumes that tier indices are static and correspond to predefined weights. However, the updateDAOMembership function in the MembershipFactory contract allows DAO administrators to reconfigure tiers, including adding, removing, or reordering them:
When tiers are reconfigured—such as being reordered or having tiers added/removed—the fixed weight assignments in shareOf no longer align with the new tier structure. This misalignment can result in incorrect profit distributions, where members of higher tiers may receive less profit than intended, and members of lower tiers may receive more.
To replicate and visualize the attack in reference, consider the structure of the DAO with below guidelines:
DAO has three tiers with indices 0, 1, and 2, assigned weights 64, 32, and 16 respectively.
An administrator calls updateDAOMembership to reorder tiers, placing the highest tier at index 2 instead of 0.
The shareOf function now assigns a lower weight to the new index 2 (previously index 0), reducing the profit share of higher-tier members.
This results in higher-tier members receiving less profit and lower-tier members receiving more than intended.
The system fails to maintain accurate and fair profit shares aligned with the current tier configurations. The fixed weight mapping does not adapt to dynamic changes in tier structures, leading to inconsistencies between tier definitions and profit calculations. Therefore, misaligned profit shares can disrupt the intended economic incentives within the DAO, potentially affecting member engagement and participation.
As the attack completion requires access to the EXTERNAL_CALLER role, even without a malicious intent, administrative errors in tier reconfiguration can cause profit distribution discrepancies.
Manual Review
Modify the shareOf function to reference dynamic weight assignments based on the current tier configuration rather than fixed indices. For that, further store weights within the DAOConfig structure to ensure they align with the actual tier positions.
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.