Closed code423n4 closed 2 years ago
WatchPug
Setting uint256 variables to 0 is redundant as they default to 0.
uint256
0
https://github.com/code-423n4/2021-12-defiprotocol/blob/205d3766044171e325df6a8bf2e79b37856eece1/contracts/contracts/Factory.sol#L34-L34
uint256 public override ownerSplit;
https://github.com/code-423n4/2021-12-defiprotocol/blob/205d3766044171e325df6a8bf2e79b37856eece1/contracts/contracts/Factory.sol#L19-L23
constructor (IAuction _auctionImpl, IBasket _basketImpl) { auctionImpl = _auctionImpl; basketImpl = _basketImpl; ownerSplit = 0; //TODO: needed? }
Consider removing ownerSplit = 0;, make the code simpler and save some gas.
ownerSplit = 0;
Duplicate of #45
Handle
WatchPug
Vulnerability details
Setting
uint256
variables to0
is redundant as they default to0
.https://github.com/code-423n4/2021-12-defiprotocol/blob/205d3766044171e325df6a8bf2e79b37856eece1/contracts/contracts/Factory.sol#L34-L34
https://github.com/code-423n4/2021-12-defiprotocol/blob/205d3766044171e325df6a8bf2e79b37856eece1/contracts/contracts/Factory.sol#L19-L23
Recommendation
Consider removing
ownerSplit = 0;
, make the code simpler and save some gas.