Closed code423n4 closed 3 years ago
GalloDaSballo
Detailed description of the impact of this finding.
_stableToLp in Buoy3Pool.sol: https://github.com/code-423n4/2021-06-gro/blob/091660467fc8d13741f8aafcec80f1e8cf129a33/contracts/pools/oracle/Buoy3Pool.sol#L184
Receives a list of N_COINS, as such there's no need to loop again to essentially re-declare the same variable
You can refactor to:
function _stableToLp(uint256[N_COINS] memory tokenAmounts, bool deposit) internal view returns (uint256) { require(tokenAmounts.length == N_COINS, "deposit: !length"); return curvePool.calc_token_amount(tokenAmounts, deposit); }
Duplicate of #27
Handle
GalloDaSballo
Vulnerability details
Impact
Detailed description of the impact of this finding.
_stableToLp in Buoy3Pool.sol: https://github.com/code-423n4/2021-06-gro/blob/091660467fc8d13741f8aafcec80f1e8cf129a33/contracts/pools/oracle/Buoy3Pool.sol#L184
Receives a list of N_COINS, as such there's no need to loop again to essentially re-declare the same variable
Proof of Concept
You can refactor to:
Tools Used
Recommended Mitigation Steps