Open code423n4 opened 2 years ago
gzeon
Detailed description of the impact of this finding.
https://github.com/Badger-Finance/ibbtc/blob/d8b95e8d145eb196ba20033267a9ba43a17be02c/contracts/Zap.sol
L111 and L234 are unreachable because pools is a Pool[4], any poolId > 3 would have been reverted in L102 and L225 respectively. We can even replace else if (poolId == 3) to else to save a little bit more gas.
else if (poolId == 3)
else
Agree with the finding but probably nofix as in the future we may add more pools
Handle
gzeon
Vulnerability details
Impact
Detailed description of the impact of this finding.
Proof of Concept
https://github.com/Badger-Finance/ibbtc/blob/d8b95e8d145eb196ba20033267a9ba43a17be02c/contracts/Zap.sol
L111 and L234 are unreachable because pools is a Pool[4], any poolId > 3 would have been reverted in L102 and L225 respectively. We can even replace
else if (poolId == 3)
toelse
to save a little bit more gas.