Project

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

`addCurrency()` and `removeCurrency()` not checking return values of `add()` and `remove()`

Summary

In CurrencyManager contract functions addCurrency() and removeCurrency() are ignoring return values ofadd() and remove().

Vulnerability Details

CurrencyManager::addCurrency() ignores return value by _whitelistedCurrencies.add(currency) and then emit an event. If the currency was not added and the ignored return code is False, then and emited event will be incorrect!
Similarly CurrencyManager::removeCurrency() ignores return value by _whitelistedCurrencies.remove(currency) and in case of failed deletion an event will be emited that the deleting was done.

Impact

Incorrectly emited events.

Tools Used

Slither, manual review

Recommendations

Check return values are True, before emiting events.

Updates

Lead Judging Commences

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

Support

FAQs

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