Currently, users can use unapproved currencies in joinDAO due to a missing whitelist check. This inconsistency could expose users to unwanted risks, as unsupported currencies should no longer be permitted for transactions within the system.
In the CurrencyManager contract, currencies can be added or removed to control their availability within the OneWP system:
When a currency is whitelisted using addCurrency, it is expected to be fully supported across the system. If it is removed using removeCurrency, the currency should no longer be available for transactions.
In the MembershipFactory contract, a currency whitelist check is enforced in the createNewDAOMembership function to ensure that only approved currencies can be used for DAO memberships:
However, after a currency is removed from the whitelist, it remains available for transactions through the joinDAO function:
In this function, no check is performed to ensure the currency remains whitelisted. Consequently, even if a currency is unapproved, users can still use it to pay, conflicting with the intended restrictions.
Consider the following scenario:
A daoMembership with tokenA is created.
The tokenA is later unwhitelisted since the system don't want to support it, due to some reasons.
However, the user could still pay with this tokenA via joinDAO in the system, which conflicts with the current intention.
Allowing unwhitelisted currencies to continue being used creates a conflict with the expected design. If a currency is no longer supported, transactions with it should not be permitted, as their ongoing use may lead to security risks and other unexpected issues.
Manual
Add currencyManager.isCurrencyWhitelisted verification in joinDAO to prevent transactions with removed currencies.
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.