The divideNft
function contains a redundant use of the onlyNftOwner
modifier, which is applied twice to the function. This leads to unnecessary gas consumption and redundancy in access control enforcement.
Currently, the function definition is:
Remove the redundant modifier application:
Gas Optimization: Eliminating redundant modifier calls reduces unnecessary gas costs.
Code Readability: Improves readability by avoiding duplicate checks.
Functionality Assurance: Ensures the same level of security without redundancy.
Manual code review
Solidity static analysis tools
Remove Duplicate Modifiers: Keep only one instance of onlyNftOwner
to avoid redundancy.
Optimize Function Logic: Review modifier placements in other functions to ensure minimal and necessary usage.
Gas Efficiency Consideration: Always review code for redundant operations that could affect gas fees.
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.