stake.link

stake.link
DeFiHardhatBridge
27,500 USDC
View results
Submission Details
Severity: low
Invalid

Variable Shadowing Issue Across Multiple Functions in SDLPool contract

Summary

The 'owner' variable is locally declared in multiple functions, potentially causing confusion across the contract for developers maintaining this code and auditors reviewing it. While this does not pose an immediate security risk, it may lead to code maintenance challenges and hinder readability.

Vulnerability Details

The 'owner' variable is locally declared in multiple functions, causing shadowing of the global 'owner' variable from the base contract. This issue, although not a security risk, may introduce confusion and readability challenges during code maintenance.

Impact

The impact of this issue is minimal in terms of security risk, given the function scope and type of the variable (view function). It primarily pertains to best practices and code readability. Variable shadowing should be avoided even if it doesn't have a direct security impact.

Tools Used

Manual review

Recommendations

  1. Consider renaming local variables to owner_ or tokenOwner to avoid shadowing the global 'owner' variable from the base contract consistently across all affected functions.

Updates

Lead Judging Commences

0kage Lead Judge almost 2 years ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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