There are a few functions declared as public that are never called internally within the contract. It is best practice to mark such functions as external instead, as this saves gas (especially in the case where the function takes arguments, as external functions can read arguments directly from calldata instead of having to allocate memory).
Handle
defsec
Vulnerability details
Impact
There are a few functions declared as public that are never called internally within the contract. It is best practice to mark such functions as external instead, as this saves gas (especially in the case where the function takes arguments, as external functions can read arguments directly from calldata instead of having to allocate memory).
Proof of Concept
https://github.com/code-423n4/2021-11-overlay/blob/914bed22f190ebe7088194453bab08c424c3f70c/contracts/market/OverlayV1Market.sol#L88
https://github.com/code-423n4/2021-11-overlay/blob/914bed22f190ebe7088194453bab08c424c3f70c/contracts/shims/OverlayV1UniswapV3MarketZeroLambdaShim.sol#L41
https://github.com/code-423n4/2021-11-overlay/blob/914bed22f190ebe7088194453bab08c424c3f70c/contracts/shims/OverlayV1UniswapV3MarketZeroLambdaShim.sol#L34
Tools Used
Code Review
Recommended Mitigation Steps
All of the public functions in the contract are not called internally, so access can be changed to external to reduce gas.