code-423n4 / 2021-09-sushimiso-findings

0 stars 0 forks source link

Unused event may be unused code or indicative of missed emit/logic #72

Open code423n4 opened 3 years ago

code423n4 commented 3 years ago

Handle

0xRajeev

Vulnerability details

Impact

Events that are declared but not used may be indicative of unused declarations where it makes sense to remove them for better readability/maintainability/auditability, or worse indicative of a missing emit which is bad for monitoring or missing logic that would have emitted that event.

Event AccessControlTemplateRemoved is missing an emit.

Proof of Concept

https://github.com/sushiswap/miso/blob/2cdb1486a55ded55c81898b7be8811cb68cfda9e/contracts/Access/MISOAccessFactory.sol#L40

Tools Used

Manual Analysis

Recommended Mitigation Steps

Add emit or remove event declaration.

Clearwood commented 2 years ago

Unused events are not a bug

ghoul-sol commented 2 years ago

making this a non-critical as it is best practices recommendation