Open code423n4 opened 2 years ago
The warden has shown how an improper assumption about the pool contract can cause reverts.
While the risk of loss of funds is non-existant because all calls will revert, I believe the core functionality of the code is broken, for that reason I think High Severity to be the proper severity
Handle
wuwe1
Vulnerability details
Proof of Concept
https://github.com/code-423n4/2022-02-concur/blob/main/contracts/ConvexStakingWrapper.sol#L94-L99
convexPool[_pid]
is set toIRewardStaking(convexBooster).poolInfo(_pid).crvRewards;
crvRewards
is aBaseRewardPool
like this one https://etherscan.io/address/0x8B55351ea358e5Eda371575B031ee24F462d503e#code.BaseRewardPool
does not implementpoolInfo
https://github.com/code-423n4/2022-02-concur/blob/main/contracts/ConvexStakingWrapper.sol#L238
Above line calls
poolInfo
ofcrvRewards
which causes revert.Recommended Mitigation Steps
According to Booster's code
https://etherscan.io/address/0xF403C135812408BFbE8713b5A23a04b3D48AAE31#code
convexBooster
requirespoolInfo[_pid].lptoken
.change L238 to