Submitted by 0rpse, also found by 0xb0k0, smbv-1923, Abhan, mansa11, and anonymousjoe
Users will not be able to nuke their NFTs for three days after canceling sale of their NFTs.
When a user puts up their NFT for sale and cancels their NFT sale, the NFT is transferred to the EntityTrading contract and back to the owner.
This transfer triggers the _beforeTokenTransfer function, which resets the lastTokenTransferredTimestamp variable.
https://github.com/code-423n4/2024-07-traitforge/blob/279b2887e3d38bc219a05d332cbcb0655b2dc644/contracts/TraitForgeNft/TraitForgeNft.sol#L367-L395
This timestamp is later checked by the nuke function to verify if the owner has held the token for at least three days, allowing them to nuke the NFT for rewards.
The issue arises because the transfers to and from the EntityTrading contract, triggered by the sale listing and cancellation, reset the lastTokenTransferredTimestamp. As a result, even though the owner still possesses the token, the reset timestamp prevents them from nuking the NFT for another three days, denying them the opportunity to receive rewards.
Add necessary checks to _beforeTokenTransfer so that:
DoS
Koolex (judge) decreased severity to Low
0rpse (warden) commented:
Koolex (judge) commented:
0rpse (warden) commented:
Koolex (judge) commented:
0rpse (warden) commented:
Koolex (judge) commented:
0rpse (warden) commented:
TForge1 (TraitForge) commented:
Koolex (judge) commented:
