Description:
The removeCurrency function in the CurrencyManager contract allows an admin to remove a currency from the system without checking if that currency is currently being used in any active DAO. The relevant code is as follows:
Impact:
This oversight can lead to significant issues for DAOs that were created using the removed currency. Specifically:
Inability to Join DAOs: Users may still attempt to join DAOs that accept the removed currency, leading to failed transactions and confusion.
Operational Disruption: Existing DAOs may face operational disruptions as they can no longer accept the currency for transactions, potentially leading to a loss of trust among members.
Financial Loss: If the currency was removed due to compliance or regulatory issues, users may inadvertently continue to engage with a currency that is no longer valid, exposing them to financial risks.
Recommended Mitigation:
To prevent this issue, the removeCurrency function should include a check to ensure that the currency is not currently being used in any active DAOs before allowing its removal. This could involve:
Maintaining a mapping of active DAOs that use each currency.
Reverting the transaction if any active DAO is found to be using the currency being removed.
An updated implementation could look like this:
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.