The current profit distribution mechanism enables users to claim profits based on token holdings, even if those tokens are from tiers that have been deprecated or removed. Malicious users may exploit this by minting large quantities of lower-level tokens prior to a tier configuration update, allowing them to continue claiming profits without contributing to the DAO’s current structure. This flaw creates a potential exploit path in case of public and private DAO, undermining the fairness and economic balance within the DAO.
Users with deprecated tokens can continue to claim profits, even though these tokens no longer provide value to the DAO’s ecosystem
Excessive profit claimed by users with deprecated tokens could deplete the DAO’s profit pool, diminishing rewards for active, compliant members
If members perceive the profit distribution as unfair, it could damage the DAO’s reputation and dissuade future participation
Consider a public DAO that initially supports a 7-tier membership structure. Before an update to reduce the number of tiers using MembershipFactory::updateDAOMembership()
(for instance, from 7 to 5), some users could anticipate the change and "frontrun" the updateDAOMembership
function. By doing so, they could mint a large quantity of tokens at tiers 6 or 7 at a lower price before the update takes effect.
Once the tier update reduces the total tiers to 5, no further tokens can be minted at the now-deprecated tiers 6 and 7. However, the MembershipERC1155::shareOf()
function continues to calculate each user’s profit share based on token balances across all original tiers (including 6 and 7). Since the function does not account for deprecated tiers, the malicious actors or some users can now claim an outsized share of the DAO’s profit pool. This effectively grants them disproportionate profits compared to other users, based on tokens held in tiers that no longer hold legitimate standing within the DAO’s structure.
Install foundry in the project by running the following commands:
Initialize git if not initialized:
Install foundry:
add to hardhat.config.ts:
Create foundry.toml
Now create a new file in the test folder:
Add these lines to the file:
Run the test:
Manual Review
Exclude deprecated tiers in profit calculations. Adjust the shareOf
function to calculate profit shares solely based on tokens in active tiers, preventing claims from deprecated tiers.
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.