Skip to content

Latest commit

 

History

History
7 lines (5 loc) · 449 Bytes

Unused_Variable.md

File metadata and controls

7 lines (5 loc) · 449 Bytes

Unused variables are allowed in Solidity and they do not pose a direct security issue. It is best practice though to avoid them as they can:

  • cause an increase in computations (and unnecessary gas consumption)

  • indicate bugs or malformed data structures and they are generally a sign of poor code quality

  • cause code noise and decrease readability of the code

  • SWC Registry: Presence of unused variables