Closed code423n4 closed 2 years ago
p4st13r4
Unused variables create noise when compiling contracts, and removing them is a good way of keeping the codebase clean
https://github.com/code-423n4/2021-12-sublime/blob/main/contracts/SavingsAccount/SavingsAccount.sol#L209
https://github.com/code-423n4/2021-12-sublime/blob/main/contracts/SavingsAccount/SavingsAccount.sol#L246
Remove unused variables from the returning value of _withdraw
_withdraw
Duplicate of #46, gas optimizations label seems more apt
Handle
p4st13r4
Vulnerability details
Impact
Unused variables create noise when compiling contracts, and removing them is a good way of keeping the codebase clean
Proof of Concept
https://github.com/code-423n4/2021-12-sublime/blob/main/contracts/SavingsAccount/SavingsAccount.sol#L209
https://github.com/code-423n4/2021-12-sublime/blob/main/contracts/SavingsAccount/SavingsAccount.sol#L246
Tools Used
Recommended Mitigation Steps
Remove unused variables from the returning value of
_withdraw