Users may inadvertently join the wrong DAO due to a chain reorganization, resulting in the loss of entry fees.
A DAO membership can be created by calling the createNewDAOMembership
function:
From the above code, it is evident that the DAO membership is implemented as a TransparentUpgradeableProxy
deployed by the MembershipFactory
contract. Since the deployment uses the new
keyword, the address derivation relies solely on the factory’s nonce.
Alice Creates a DAO Membership:
Alice creates a DAO membership, resulting in the deployment of a DAO at address 0xabc
.
Bob Attempts to Join Alice’s DAO:
Bob intends to join Alice’s DAO by calling the joinDAO
function with daoMembershipAddress
set to 0xabc
and paying the required entry fee.
Reorganization and Exploitation:
During a blockchain reorganization:
Charlie observes Bob’s pending transaction.
Charlie quickly creates a new DAO membership using the MembershipFactory
identical to Alice’s DAO.
Since the DAO address derivation depends solely on the factory's nonce, Charlie’s DAO is deployed at the same address 0xabc
.
Redirection of Bob’s Payment:
After the reorg, when Bob’s transaction is confirmed, it interacts with Charlie’s DAO instead of Alice’s. Consequently:
Bob's payment and membership are directed to Charlie’s DAO.
Loss of funds for users: Users will lose the platform fee and the tier price. The impact becomes significantly higher if the user approves the protocol with an allowance of type(uint256).max
.
Manual Review
use CREATE2 for deploying the proxy
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.