code-423n4 / 2021-10-tally-findings

0 stars 0 forks source link

Unnecessary require statement in `Swap`'s constructor #62

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Handle

pants

Vulnerability details

This require statement is unnecessary since the function transferOwnership(), that was inherited from Ownable, requires the same thing:

require(owner_ != address(0), "Swap::constructor: Owner must not be 0");

Impact

This require statement increase gas usage for no reason.

Tool Used

Manual code review.

Recommended Mitigation Steps

Remove this require statement.

Shadowfiend commented 2 years ago

Will likely be nuking this entirely due to #78 .