Attackers can front-run the creation of a new DAO by registering a DAO with the same ensname before the legitimate user, effectively squatting on the ENS name and preventing the intended DAO from being created.
In the MembershipFactory
contract, the createNewDAOMembership
function uses the ensname as a unique identifier for DAOs:
This check ensures that no DAO with the same ensname has been created. However, since the ensname is not tied to actual ENS ownership, an attacker can front-run the transaction of a legitimate user by creating a DAO with the same ensname just before the user's transaction is mined.
This causes the user's transaction to revert with the "DAO already exist." error, forcing them to choose a different name, and potentially causing confusion or damage if the attacker uses the name maliciously.
Legitimate users are prevented from creating DAOs with their desired ensname, leading to potential brand dilution. This is especially critical if the ensname corresponds to an established brand or community.
Foundry
Consider allowing duplicate ens names. However, don't use the names as a mapping index for checking the proxy address
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.