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

6 stars 2 forks source link

Fancy Raisin Gorilla - The function `shouldCancelRaffle` in the contract `WinnablesTicketManager.sol` always returns true #640

Closed sherlock-admin4 closed 3 months ago

sherlock-admin4 commented 3 months ago

Fancy Raisin Gorilla

Low/Info

The function shouldCancelRaffle in the contract WinnablesTicketManager.sol always returns true

Summary

shouldCancelRaffle always returns true rather than returning the correct answer based on the condition.

Root Cause

We can see that @return states that it should either return true or false but it is hardcoded to always return true. https://github.com/sherlock-audit/2024-08-winnables-raffles/blob/main/public-contracts/contracts/WinnablesTicketManager.sol#L157-L163

Internal pre-conditions

No response

External pre-conditions

No response

Attack Path

No response

Impact

Incorrect return of information may lead to incorrect logic implementation and incorrect information fetched by the users.

PoC

No response

Mitigation

Make _checkShouldCancel return a bool value and return this value.