In the addCurrency and removeCurrency functions, the contract does not check the return value of the _whitelistedCurrencies.add and _whitelistedCurrencies.remove operations. This could lead to unexpected behavior if these operations fail, as no revert or indication of failure would be provided to the caller.
Issue: The functions _whitelistedCurrencies.add and _whitelistedCurrencies.remove return a boolean value indicating success, but the return value is currently ignored. Ignoring the return value may lead to the assumption that the currency was successfully added or removed when, in fact, it was not.
Root Cause: Lack of a return value check after invoking operations on the _whitelistedCurrencies set.
If the add or remove the operation fails silently, the contract might operate under the assumption that a currency has been successfully added to or removed from the whitelist. This could lead to inconsistencies within the system, potentially allowing or disallowing certain currencies in ways not intended.
Manual code review
Add checks for the boolean return values of _whitelistedCurrencies.add and _whitelistedCurrencies.remove to ensure successful execution:
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.