code-423n4 / 2021-09-defiprotocol-findings

1 stars 0 forks source link

Remove unused variable from contract #65

Closed code423n4 closed 2 years ago

code423n4 commented 3 years ago

Handle

kenzo

Vulnerability details

Auction.sol: uint256 BLOCK_DECREMENT https://github.com/code-423n4/2021-09-defiProtocol/blob/52b74824c42acbcd64248f68c40128fe3a82caf6/contracts/contracts/Auction.sol#L14

This is not used and can be removed. I would have classified this as gas improvement, but Solidity compiler running with optimization will anyway remove it it seems and it makes no difference to the deployment gas.

Also, there's this field that seems to be unneeded: IFactory.sol: struct Bounty https://github.com/code-423n4/2021-09-defiProtocol/blob/52b74824c42acbcd64248f68c40128fe3a82caf6/contracts/contracts/interfaces/IFactory.sol#L6:#L10 But removing it seems to add 24 gas to deployment, dunno why honestly.

GalloDaSballo commented 2 years ago

Agree with finding

GalloDaSballo commented 2 years ago

Duplicate of #57