Closed code423n4 closed 2 years ago
This is intentional to be consistent with all other Yield oracles
It's not about removing the variables per se, but the fact that they are named (and therefore allocated, using gas), and then we redeclare return variables by returning the result of _peek
directly.
Duplicated of #60, suggested to be confirmed as a code clarity issue.
Handle
throttle
Vulnerability details
Impact
Gas savings
Proof of Concept
Remove unused return variables https://github.com/code-423n4/2022-01-yield/blob/main/contracts/Cvx3CrvOracle.sol#L76 https://github.com/code-423n4/2022-01-yield/blob/main/contracts/Cvx3CrvOracle.sol#L97
Tools Used
Manual review
Recommended Mitigation Steps
Remove unused variables