Project

One World
NFTDeFi
15,000 USDC
View results
Submission Details
Severity: low
Valid

Lack of Dependency Check and Transition Mechanism for dao's in CurrencyManager::removeCurrency() Function

Summary

The removeCurrency function in the CurrencyManager contract allows an administrator to remove a currency from the whitelist. However, it does not check if any DAOs are currently using this currency. Removing a currency without verifying its usage can lead to operational issues, such as preventing users from joining DAOs that rely on the removed currency. Additionally, there is no mechanism to update the currency of affected DAOs to an equivalent or alternative currency.

Vulnerability Details

The removeCurrency function is designed to remove a currency from the system's whitelist:

function removeCurrency(
address currency
) external override onlyRole(ADMIN_ROLE) {
if (!_whitelistedCurrencies.contains(currency))
revert CurrencyManagerError("Not whitelisted");
_whitelistedCurrencies.remove(currency);//@audit-does not check if any dao uses the currency and there is no logic to update the currency for dao's
emit CurrencyRemoved(currency);
}

as we can see above This function does not verify whether the currency being removed is actively used by any DAOs. This oversight can lead to situations where DAOs are left without a valid currency for transactions.

Example Scenario

  1. Setup:
    * A DAO is created using a specific currency, say TokenA, which is whitelisted in the system.

  2. Currency Removal:
    An administrator removes TokenA from the whitelist using the removeCurrency function.

  3. Impact on DAO:
    Users attempting to join or interact with the DAO using TokenA will be unable to do so, as the currency is no longer recognized by the system.
    The DAO is effectively locked, with no mechanism to transition to a different currency.

Impact

  • users cannot joins the dao neither admin or creator can update the dao currency

Tools Used

manual review

Recommendations

  • Before removing a currency, implement a check to verify whether any DAOs are currently using the currency. If so, prevent its removal as there is no way for dao's to update the currency

Updates

Lead Judging Commences

0xbrivan2 Lead Judge 9 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Appeal created

aresaudits Submitter
9 months ago
aresaudits Submitter
9 months ago
0xbrivan2 Lead Judge
9 months ago
0xbrivan2 Lead Judge 9 months ago
Submission Judgement Published
Validated
Assigned finding tags:

missing DAO currency update

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.