createNewDAOMembership function, there is no validation to ensure that the price of each tier is greater than zero. Allowing tiers with a zero price may not align with the intended business logic and could lead to unintended free memberships.Code Snippet:
for (uint256 i = 0; i < tierConfigs.length; i++)
{
require(tierConfigs[i].minted == 0, "Invalid tier config"); // Missing validation: require(tierConfigs[i].price > 0, "Tier price must be greater than zero.");
dao.tiers.push(tierConfigs[i]);
}
Explanation:
Tiers with a price of zero enable users to join the DAO for free.
If the DAO does not intend to offer free memberships, this could be a problem.
Add Validation for Tier Price:
require(tierConfigs[i].price > 0, "Tier price must be greater than zero.");
If zero-priced tiers are acceptable in certain contexts (e.g., free membership levels), make this explicit in the business logic and document it clearly.
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.