-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
Description of the Bug
The PawnBank contract seizeNFT function requires that the the loanCompletionTime be less than the block's timestamp:
require(loan.loanCompleteTime < block.timestamp, "Can't seize before expiry.");
Unfortunately, the code is using block.timestamp to determine the current block timestamp. This can be manipulated by a major block miner who if has enough ming power can insert their own transaction that manipulates the block.timestamp value in such a way that they can seize a NFT loan before it expires.
Solution
Do not use block.timestamp to determine if a loan is expired. Unfortunately I do not have a strong suggestion for a fix. I would be interested in what ideas you do have to fix this.
Anything Else We Should Know
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels