Unused storage variable in UsdmMinter.sol #42
Labels
bug
Something isn't working
G (Gas Optimization)
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Handle
harleythedog
Vulnerability details
Impact
In UsdmMinter.sol, there is a public array called "factories", but this array is never added to or altered anywhere within the contract. So, this array will always be empty and doesn't seem like it would be of any use to anyone, so I recommend removing it to save gas.
Proof of Concept
Variable declaration here: https://github.com/code-423n4/2021-10-mochi/blob/main/projects/mochi-core/contracts/minter/UsdmMinter.sol#:~:text=address%5B%5D%20public%20factories%3B
Tools Used
Manual inspection.
Recommended Mitigation Steps
Remove unused variable to optimize gas.
The text was updated successfully, but these errors were encountered: