Open code423n4 opened 2 years ago
Agree with the finding, would appreciate the explanation as to why that's the case.
From my understanding, a public function will copy it's values from callData to memory, already declaring those array to memory drastically increases the cost of using them
Handle
t11s
Vulnerability details
Impact
Gas is wasted making
settleAuction
public, and usingmemory
Instead of calldata for its arguments.Proof of Concept
https://github.com/code-423n4/2021-09-defiProtocol/blob/52b74824c42acbcd64248f68c40128fe3a82caf6/contracts/contracts/Auction.sol#L69