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

6 stars 2 forks source link

Fancy Raisin Gorilla - `shouldDrawRaffle` in `WinnablesTicketManager.sol` always returns true #639

Closed sherlock-admin4 closed 3 months ago

sherlock-admin4 commented 3 months ago

Fancy Raisin Gorilla

Low/Info

shouldDrawRaffle in WinnablesTicketManager.sol always returns true

Summary

In WinnablesTicketManager.sol the function should return true or false based on a condition but the function always returns true.

Root Cause

Here the internal function _checkShouldDraw does not return anything it only reverts. Which contradicts the @return statement. https://github.com/sherlock-audit/2024-08-winnables-raffles/blob/main/public-contracts/contracts/WinnablesTicketManager.sol#L149-L155

Internal pre-conditions

No response

External pre-conditions

No response

Attack Path

No response

Impact

The protocol returns incorrect information, resulting in misleading users.

PoC

No response

Mitigation

Change _checkShouldDraw to return a bool and based on that bool return the correct answer.