Closed code423n4 closed 2 years ago
defsec
Some storage variables are only set once and never changed.
Changing them to constant can save gas.
The following variable can mark as constant.
https://github.com/code-423n4/2021-11-overlay/blob/914bed22f190ebe7088194453bab08c424c3f70c/contracts/shims/ComptrollerShim.sol#L15
https://github.com/code-423n4/2021-11-overlay/blob/914bed22f190ebe7088194453bab08c424c3f70c/contracts/OverlayV1UniswapV3Market.sol#L14
Code Review
Consider changing to constant and using all caps for the names.
Indeed, I think this would have been changed when we did final house cleaning and preparations for actual deployment.
duplicate #85
Handle
defsec
Vulnerability details
Impact
Some storage variables are only set once and never changed.
Changing them to constant can save gas.
Proof of Concept
The following variable can mark as constant.
https://github.com/code-423n4/2021-11-overlay/blob/914bed22f190ebe7088194453bab08c424c3f70c/contracts/shims/ComptrollerShim.sol#L15
https://github.com/code-423n4/2021-11-overlay/blob/914bed22f190ebe7088194453bab08c424c3f70c/contracts/OverlayV1UniswapV3Market.sol#L14
Tools Used
Code Review
Recommended Mitigation Steps
Consider changing to constant and using all caps for the names.