Submitted by Soosh, also found by dipp, indijanc, maks, jadezti, gz627, sces60107, Zarf, neumo, Ch_301, imare, Trust, btk, kuldeep, bin2chen, immeas, obront, hansfriese, Koolex, Apocalypto, carrotsmuggler, hihen, HE1M, rvierdiiev, SmartSek, 9svR6w, sk8erboy, ladboy233, Titi, dic0de, and csanuragjain
On contest page:
"If no users ultimately claim the NFT, the admin specifies a timelock period after which they can retrieve the raffled NFT."
Lets assume a recoverTimelock of 1 week.
The specification suggests that 1 week from the winner not having claimed the NFT. Meaning that the admin should only be able to call lastResortTimelockOwnerClaimNFT() only after <block.timestamp at fulfillRandomWords()> + request.drawTimelock + 1 weeks.
Specification:
But this is not the case.
recoverTimelock is set in the initialize(...) function and nowhere else. That means 1 week from initialization, the admin can call lastResortTimelockOwnerClaimNFT(). redraw() also does not update recoverTimelock.
In fact, startDraw() does not have to be called at the same time as initialize(...). That means that if the draw was started after having been initialized for 1 week, the admin can withdraw at any time after that.
Protocol does not work as intended.
Just like for drawTimelock, recoverTimelock should also be updated for each dice roll.
<block.timestamp at fulfillRandomWords()> + request.drawTimelock + <recoverBufferTime>. Where <recoverBufferTime> is essentially the drawBufferTime currently used, but for recoverTimelock.
Note: currently, drawTimelock is updated in the _requestRoll() function. This is technically less correct as chainlink will take some time before fulfillRandomWords(...) callback. So the timelock is actually set before the winner has been chosen.  This should be insignificant under normal network conditions (Chainlink VRF shouldnt take > 1min) but both timelocks should be updated in the same function - either _requestRoll() or fulfillRandomWords(...).
iainnash (Forgeries) confirmed and commented:
gzeon (judge) increased severity to High and commented:
