Summary
Users can create a new DAO membership usingMembershipFactory::createNewDAOMembership
. This function validates input and creates a new transparent upgradeable proxy which ties itself to the MembershipERC1155
contract. The function first deploys the upgradeable contract and then it checks whether tier config provided by user is valid or not. When a user submits invalid tier config data to create a new DAO, this could lead to significant gas wastage.
Vulnerability analysis
The issue occurs at line 14 in the above code. TierConfig data is looped through to check if the minted value is zero or not. This condition should be checked before deploying the proxy contract. After deploying the proxy the tier config data should be pushed into the state variable. As tierConfigs
length can't be greater than 7, writing for loops before deploying and after deploying shouldn't cost much.
Impact
User spends too much gas. Impact is low.
Tools used
Manual analysis
Recommendations
Please validate the tier config data before creating a new contract. Then after deploying the proxy write a for loop again to push tier config data to state variable.
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.