code-423n4 / 2021-12-sublime-findings

0 stars 0 forks source link

Unused variables in SavingsAccount.sol #164

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

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

ritik99 commented 2 years ago

Duplicate of #46, gas optimizations label seems more apt