Missing checks in `_rewardTokensConfigs.processorFees` & `_rewardTokensConfigs.podFees` in `CvxAssetStakerBuffer::setRewardTokensConfig` will cause `CvxAssetStakerBuffer::pullRewards`uncallable. #71
The function CvxAssetStakerBuffer::setRewardTokensConfig is missing value checks on _rewardTokensConfigs.processorFees & _rewardTokensConfigs.podFees parameters.
If the owner set these two value such that _rewardTokensConfigs.podFees + _rewardTokensConfigs.processorFees > DENOMINATOR, the following line will revert due to underflow:
The function CvxAssetStakerBuffer::pullRewards will process rewards from Convex to stakers for the previous cycle. Owner can either through accidental or intentional setting wrong values for _rewardTokensConfigs.processorFees & _rewardTokensConfigs.podFees values to cause the pullRewards function uncallable. As a result, users' rewards will be frozen temporary or permanently.
Noticed that when_rewardTokensConfig.podFees + _rewardTokensConfig.processorFees > DENOMINATOR, it will result in podFees + processorFees > balance, therefore resulting in revert due to underflow in line 167.
Setting this issue as Low Severity as CvxAssetStakerBuffer::setRewardTokensConfig function is protected however the impact can be High as it cause denial of service in CvxAssetStakerBuffer::pullRewardsfunction.
Revised Code File (Optional)
Consider making the following changes in CvxAssetStakerBuffer::setRewardTokensConfig:
Github username: @erictee2802 Twitter username: 0xEricTee Submission hash (on-chain): 0x44cf3fdf0d7f9f6b7dbbc4cb49886fbfcd7bb352275eb0d966c0b4e00b814a1c Severity: low
Description: Description\
The function
CvxAssetStakerBuffer::setRewardTokensConfig
is missing value checks on_rewardTokensConfigs.processorFees
&_rewardTokensConfigs.podFees
parameters.If the owner set these two value such that
_rewardTokensConfigs.podFees
+_rewardTokensConfigs.processorFees
>DENOMINATOR
, the following line will revert due to underflow:CvxAssetStakerBuffer::pullRewards Line 167
:Attack Scenario\
The function
CvxAssetStakerBuffer::pullRewards
will process rewards from Convex to stakers for the previous cycle. Owner can either through accidental or intentional setting wrong values for_rewardTokensConfigs.processorFees
&_rewardTokensConfigs.podFees
values to cause thepullRewards
function uncallable. As a result, users' rewards will be frozen temporary or permanently.Attachments
NA
In
CvxAssetStakerBuffer::pullRewards
:Noticed that when
_rewardTokensConfig.podFees
+_rewardTokensConfig.processorFees
>DENOMINATOR
, it will result inpodFees
+processorFees
>balance
, therefore resulting in revert due to underflow in line 167.Setting this issue as Low Severity as
CvxAssetStakerBuffer::setRewardTokensConfig
function is protected however the impact can be High as it cause denial of service inCvxAssetStakerBuffer::pullRewards
function.Consider making the following changes in
CvxAssetStakerBuffer::setRewardTokensConfig
: