code-423n4 / 2021-11-malt-findings

0 stars 0 forks source link

Unneeded variables (Auction.sol, StabilizerNode.sol) #137

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Handle

ye0lde

Vulnerability details

Impact

Gas savings and code clarity

Proof of Concept

The success variable is not necessary here: https://github.com/code-423n4/2021-11-malt/blob/c3a204a2c0f7c653c6c2dda9f4563fd1dc1cecf3/src/contracts/Auction.sol#L541-L544 https://github.com/code-423n4/2021-11-malt/blob/c3a204a2c0f7c653c6c2dda9f4563fd1dc1cecf3/src/contracts/StabilizerNode.sol#L319-L322

Tools Used

Visual Studio Code, Remix

Recommended Mitigation Steps

I suggest making the changes below at: https://github.com/code-423n4/2021-11-malt/blob/c3a204a2c0f7c653c6c2dda9f4563fd1dc1cecf3/src/contracts/Auction.sol#L541-L544 https://github.com/code-423n4/2021-11-malt/blob/c3a204a2c0f7c653c6c2dda9f4563fd1dc1cecf3/src/contracts/StabilizerNode.sol#L319-L322

      if (!IAuctionStartController(auctionStartController).checkForStart()) {
        return;
      }
GalloDaSballo commented 2 years ago

Finding is valid, same as #382 but in different spot