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

6 stars 2 forks source link

Valenz - `WinnablesTicket::ownerOf` can get the wrong winner #555

Closed sherlock-admin3 closed 3 months ago

sherlock-admin3 commented 3 months ago

Valenz

Medium

WinnablesTicket::ownerOf can get the wrong winner

Summary

The WinnablesTicket::ownerOf can pick the wrong winner when called as the function cannot get the range of token that an owner have.

Root Cause

Internal pre-conditions

  1. The tickets are not all sold

External pre-conditions

  1. The function needs to be called

Attack Path

  1. The function ownerOf is called
  2. The function returns the winner based on the algorithm
  3. Turns out that the token does not have an owner.

Impact

PoC

No response

Mitigation

No response