Omniscia Keyko Audit
Community Static Analysis Findings
Community Static Analysis Findings
COM-01S: Inexistent Prevention of Duplicates
| Type | Severity | Location |
|---|---|---|
| Standard Conformity | Informational | Community.sol:L288-L291, L612-L615 |
Description:
The for loops within the initialize and addManagersToBlockList functions of the contract iterate through the managerBlockList_ and emit a ManagerAddedToBlockList event for each one even if duplicate entries exist.
Example:
contracts/community/Community.sol
288for (uint256 i = 0; i < managerBlockList_.length; i++) {289 _managerBlockList.add(managerBlockList_[i]);290 emit ManagerAddedToBlockList(managerBlockList_[i]);291}Recommendation:
As the library used to maintain the block list prevents duplicate entries, we advise the bool yielded by add to be utilized either in a require check or in an if clause that will then emit the corresponding event to prevent incorrect events from being emitted. We advise a similar paradigm to also be applied to the removal of managers from the blocklist to prevent misleading events from being emitted.
Alleviation:
The manager block list notion has been omitted from the codebase no longer rendering this exhibit relevant.