Owners can delay the call to startDraw
to reject the draw result
#300
Labels
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
duplicate-146
satisfactory
satisfies C4 submission criteria; eligible for awards
upgraded by judge
Original issue severity upgraded from QA/Gas by judge
Lines of code
https://github.com/code-423n4/2022-12-forgeries/blob/main/src/VRFNFTRandomDraw.sol#L306
Vulnerability details
Impact
Owners can call
lastResortTimelockOwnerClaimNFT
to reclaim NFT back ifsettings.recoverTimelock <= block.timestamp
. Butsettings.recoverTimelock
is set ininitialize
, Owner can delay the call tostartDraw
untilsettings.recoverTimelock
.If the owner wants to refuse to give NFT to some specific winners, the owner can call
lastResortTimelockOwnerClaimNFT
if some specific winners win the draw. Because the owner delayed the call tostartDraw
, the owner can call (or front-runwinnerClaimNFT
)lastResortTimelockOwnerClaimNFT
in no time.Proof of Concept
The
lastResortTimelockOwnerClaimNFT
function checkssettings.recoverTimelock
:If an owner delays the
startDraw
untilsettings.recoverTimelock
, the owner can calllastResortTimelockOwnerClaimNFT
in no time. The owner can reject some specific winners by frontrunningwinnerClaimNFT()
which is called by the winner.Tools Used
Manual Review
Recommended Mitigation Steps
Add
recoverBufferTime
variable, and resetsettings.recoverTimelock
instartDraw
:The text was updated successfully, but these errors were encountered: