Pieces Protocol

First Flight #32
Beginner FriendlyFoundrySolidityNFT
100 EXP
View results
Submission Details
Severity: low
Invalid

Local Variable Shadowing

Summary

Variable shadowing can lead to unintended behavior by overwriting or masking state variables.

Vulnerability Details

Instances of local variable shadowing:

  • ERC20ToGenerateNftFraccion.constructor: Local variables _name and _symbol shadow state variables in the ERC20 base contract.

Impact

Shadowing increases the risk of errors in logic, especially during contract upgrades or audits.

Tools Used

  • Slither: Flagged occurrences of shadowing during analysis.

Recommendations

  1. Rename local variables to avoid shadowing (e.g., _localName or _constructorName).

  2. Conduct manual code reviews to identify and resolve shadowing instances.

  3. Use tools like Slither regularly during development.

Updates

Lead Judging Commences

fishy Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.