sherlock-audit / 2024-08-winnables-raffles-judging

6 stars 2 forks source link

Rural Midnight Snail - Unused Error Messages in `IWinnables` and `IWinnablesTicketManager` Interfaces, and Missing `Ownable` Implementation in `WinnablesPrizeManager.sol` #632

Closed sherlock-admin4 closed 3 months ago

sherlock-admin4 commented 3 months ago

Rural Midnight Snail

Low/Info

Unused Error Messages in IWinnables and IWinnablesTicketManager Interfaces, and Missing Ownable Implementation in WinnablesPrizeManager.sol

Summary

There are multiple error messages defined in the IWinnables and IWinnablesTicketManager interfaces that are not utilised in the current implementation:

IWannables https://github.com/sherlock-audit/2024-08-winnables-raffles/blob/main/public-contracts/contracts/interfaces/IWinnables.sol#L4

IWinnablesTicketManager https://github.com/sherlock-audit/2024-08-winnables-raffles/blob/main/public-contracts/contracts/interfaces/IWinnablesTicket.sol#L6

Additionally, in the WinnablesPrizeManager.sol contract, the Ownable module from OpenZeppelin is imported but not utilised.

Vulnerability Detail

The presence of unused error messages and imports can create confusion for developers and auditors, leading to unnecessary complexity in the codebase.

Impact

The impact is minimal but includes potential confusion and unnecessary lines of code, which can affect code maintainability and clarity.

Tool used

Manual Review

Recommendation

It is best practice to either use the defined error messages and imports or remove them to maintain a clean and understandable codebase.

sherlock-admin2 commented 2 months ago

The protocol team fixed this issue in the following PRs/commits: https://github.com/Winnables/public-contracts/pull/11