When the admin removes a tier from DAO, then the tier is added back the minted amount will be zero, but the actual minted tokens will remain.
Whenever a updateDAOMembership
is called here: https://github.com/Cyfrin/2024-11-one-world/blob/1e872c7ab393c380010a507398d4b4caca1ae32b/contracts/dao/MembershipFactory.sol#L100
The tiers configs can be modified and removed.
When a tier is removed and then later added back at a later date the minted amount will be reset it the MembershipFactory
while the MembershipERC1155
will remain.
As a result, the accounting will be different between contracts.
The TierConfig.amount
which limits the number of tokens for each tier will no longer be relevant.
Paste the following test into the MembershipFactory.test.ts
, run anvil
and then run the test with the following command npx hardhat test --grep "Erase MembershipFactory account for tiers minted" --network localhost
Note add the following event to the end of the MembershipFactory::joinDao
function to monitor the contract state:
The max number of members for a tier can be will be ignored and allow more than desired amount of members in the DAO
hardhat, foundry and manual review
When increasing the amount of tiers for a DAO check the balance for a token in the MembershipERC1155
contract and updated the minted amount for the tier.
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.