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

6 stars 2 forks source link

Deep Flint Finch - Discrepancy in shouldCancelRaffle and shouldDrawRaffle functions #636

Closed sherlock-admin4 closed 3 months ago

sherlock-admin4 commented 3 months ago

Deep Flint Finch

Low/Info

Discrepancy in shouldCancelRaffle and shouldDrawRaffle functions

Summary

The function documentation states it should return false in some cases, but the implementation always returns true if it doesn't revert

   /// @notice (Public) Check if a raffle should be canceled
    /// @param raffleId Raffle ID
    /// @return true if the raffle should be canceled, false otherwise
    function shouldCancelRaffle(uint256 raffleId) external view returns(bool) {
        _checkShouldCancel(raffleId);
        return true;
    }

     /// @notice (Public) Check if a raffle should draw a winner
    /// @param raffleId Raffle ID
    /// @return true if the winner should be drawn, false otherwise
    function shouldDrawRaffle(uint256 raffleId) external view returns(bool) {
        _checkShouldDraw(raffleId);
        return true;
    }

Root Cause

No response

Internal pre-conditions

No response

External pre-conditions

No response

Attack Path

No response

Impact

No response

PoC

No response

Mitigation

No response

sherlock-admin2 commented 2 months ago

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