Summary
Shadowing of other variables using local variables.
Vulnerability Details
File: contracts/beanstalk/silo/MigrationFacet.sol
MigrationFacet.getDepositLegacy(address,address,uint32).s (contracts/beanstalk/silo/MigrationFacet.sol#95) shadows:
- ReentrancyGuard.s (contracts/beanstalk/ReentrancyGuard.sol#17) (state variable)
L#95,
95: AppStorage storage s = LibAppStorage.diamondStorage();
GitHub : 95-95
File: contracts/beanstalk/silo/MigrationFacet.sol
MigrationFacet.totalMigratedBdv(address).s (contracts/beanstalk/silo/MigrationFacet.sol#116) shadows:
- ReentrancyGuard.s (contracts/beanstalk/ReentrancyGuard.sol#17) (state variable)
L#116,
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.