Draw admin somewhat has control over whether he wants a certain person to be a winner. #65
Labels
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
duplicate-146
edited-by-warden
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#L304-L320
https://github.com/code-423n4/2022-12-forgeries/blob/main/src/VRFNFTRandomDraw.sol#L173-L198
Vulnerability details
Impact
An admin of a random draw is able to wait out the timer required to call lastResortTimelockOwnerClaimNFT before starting the draw. This allows an admin to frontrun a winnerClaimNFT transaction if the addr of the winner is not someone the admin would like to see win.
Proof of Concept
Consider the following foundry test:
Tools Used
Manual review
Recommended Mitigation Steps
Make sure that the settings.recoverTimelock timstamp is set at drawing instead of initialisation.
The text was updated successfully, but these errors were encountered: