The TokenDivider contract contains instances of redundant code where identical checks and modifiers are repeated unnecessarily. These redundancies not only make the code less efficient but also increase gas costs for users interacting with the contract.
There are two significant instances of redundant code in the contract:
In the divideNft function, the onlyNftOwner modifier is applied twice with identical parameters:
In the transferErcTokens function, the zero address check for the recipient is performed twice:
Each redundant check and modifier adds unnecessary gas costs to transactions. The duplicate modifier in divideNft means users pay twice for the same ownership verification, while the repeated zero address check-in transferErcTokens wastes gas in an already-verified condition.
For the divideNft function:
For the transferErcTokens function:
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.