The MembershipFactory::joinDAO() function uses transferFrom instead of `safeTransferFrom` and without checking return values, which could lead to silent failures with non-standard ERC20 tokens that might be added in the future through the currency manager.
Some ERC20 tokens (like USDT) don't revert on failure but return false instead. Since the contract uses transferFrom without checking the return value:
If transfer fails:
The token returns false instead of reverting and return value is not checked
The membership NFT is still minted
Proof of concept
Log shows Bob still gets the share even if transfers failed
The protocol currently only supports WBTC, WETH, and USDC - all of which properly revert on failed transfers, making this temporarily safe. However, if the protocol adds support for additional tokens through the currency manager (e.g., USDT, which is a commonly requested token), silent failures would lead to users receiving membership NFTs without successful payment.
Manual review
Foundry
Import and use OpenZeppelin's SafeERC20 library to handle ERC20 transfers safely:
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.