Description: In SoulboundProfileNFT.sol
, the same profile deletion logic is duplicated in two different places. This includes burning the token, cleaning up mappings, and emitting events.
Duplicated code found in:
Impact:
Code duplication increases maintenance burden
Changes need to be made in multiple places
Increased risk of inconsistencies if one instance is updated but not the other
Larger contract size due to duplicate code
Recommended Mitigation: Create a private function to handle profile deletion:
This refactoring:
Reduces code duplication
Makes maintenance easier
Ensures consistent profile deletion logic
Makes the code more modular and easier to test
Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelyhood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.
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.