According to the sponsor team's response in section 7.3.8 of the Cyfrin audit report, users who intend to leave a DAO will notify the EXTERNAL_CALLER via off-chain methods, after which their tokens will be burned. Currently, the only way to perform this burn action is through an external call initiated by the MembershipFactory contract. While a burn transaction is sent to the MembershipERC1155 contract to reduce the user’s token balance, the DAOConfig struct in MembershipFactory remains unsynchronized, as the minted count for the tier is not decreased.
As a result of this desynchronization, fewer members than anticipated may be eligible to join the DAO, since the minted tier count in the factory contract and the actual membership token supply on-chain are not aligned.
The following PoC in Foundry simplifies an scenario where Alice mints a tier 6 membership and then the factory relays the call to the membership NFT contract, essentially simulating the external call process.
Manual review
I propose two options:
Implement a dedicated function in the factory contract that performs the external call while also updating the DAOConfig struct.
In the MembershipFactory::callExternalContract
function, consider adding logic to check the function signature and update the configuration struct when burn functions in the MembershipERC1155 contract are called.
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.