DeFiHardhatOracleProxyUpdates
100,000 USDC
View results
Submission Details
Severity: low
Invalid

Local variable shadowing

Summary

Shadowing of other variables using local variables.

Vulnerability Details

File: contracts/beanstalk/silo/MigrationFacet.sol
/// @audit ******************* Issue Detail *******************
MigrationFacet.getDepositLegacy(address,address,uint32).s (contracts/beanstalk/silo/MigrationFacet.sol#95) shadows:
- ReentrancyGuard.s (contracts/beanstalk/ReentrancyGuard.sol#17) (state variable)
/// @audit ************** Possible Issue Line(s) **************
L#95,
/// @audit ****************** Affected Code *******************
95: AppStorage storage s = LibAppStorage.diamondStorage();

GitHub : 95-95

File: contracts/beanstalk/silo/MigrationFacet.sol
/// @audit ******************* Issue Detail *******************
MigrationFacet.totalMigratedBdv(address).s (contracts/beanstalk/silo/MigrationFacet.sol#116) shadows:
- ReentrancyGuard.s (contracts/beanstalk/ReentrancyGuard.sol#17) (state variable)
/// @audit ************** Possible Issue Line(s) **************
L#116,
/// @audit ****************** Affected Code *******************
116: AppStorage storage s = LibAppStorage.diamondStorage();

GitHub : 116-116

Impact

state Variable shadowing by some local variable will use value of local variable instead of state variable and may lead contract to a wrong state.

Tools Used

Manual Review

Recommendations

Rename the local variables that shadow another component.

Updates

Lead Judging Commences

giovannidisiena Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Lack of quality
Assigned finding tags:

Informational/Invalid

Support

FAQs

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