The divideNft function redundantly applies the onlyNftOwner(nftAddress, tokenId) modifier twice, which is unnecessary and impacts code clarity.
The function has two instances of the onlyNftOwner(nftAddress, tokenId) modifier in its definition:
Applying the same modifier twice does not add additional security but increases the cost of gas and creates confusion for developers and auditors.
The redundant modifier leads to higher gas usage for users interacting with this function. While it does not create a direct security risk, it decreases the efficiency and maintainability of the code.
Manual code review.
Remove the redundant onlyNftOwner(nftAddress, tokenId) modifier so that the function uses it only once.
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.