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

1 stars 0 forks source link

Gas: Factory parameter can be removed from Auction #225

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Handle

cmichel

Vulnerability details

The Auction.initialize function accepts a factory_ parameter. However, as this contract is always initialized directly from the factory, it can just use msg.sender.

Recommended Mitigation Steps

Removing the additional factory_ parameter and using msg.sender instead will save gas. This is already done for the other Basket contract.

GalloDaSballo commented 2 years ago

Valid finding