The following line of code in the divideNft function contradicts the logic enforced by the onlyNftOwner modifier:
The onlyNftOwner modifier ensures that the caller (msg.sender) owns the NFT before executing the function. However, the line above rechecks ownership after the NFT has already been transferred to the contract, expecting the caller to no longer own the NFT. This creates a logical contradiction:
Before this line, the onlyNftOwner modifier has already validated that msg.sender owns the NFT.
This line assumes the ownership should have already transferred, but it also unnecessarily reverts if the caller still owns the NFT.
Unnecessary Reversion:
If the NFT transfer fails, the function reverts without a valid explanation of why the transfer failed.
This can create confusion as the revert condition is misleading—ownership verification has already been performed by the onlyNftOwner modifier.
Manual review
Replace the contradictory line with a direct validation of the transfer, ensuring proper handling of failures or simply remove it, as the modifier has done the validation checking
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.