You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lack of incentives to call bumpEarningPower for small rewards
Summary
Since the tip that will be received in the bumpEarningPower function must be less or equal to the minimum between the unclaimed fees and the maxBumpTip, if the rewards are too small, there is a lack of incentives to call this function.
Vulnerability Detail
Here we can see that the tip that will be received in the bumpEarningPower must be less or equal to the minimum between the unclaimed fees and the maxBumpTip in the bumpEarningPower function.
uint256 _unclaimedRewards = deposit.scaledUnclaimedRewardCheckpoint / SCALE_FACTOR;
(uint256_newEarningPower, bool_isQualifiedForBump) = earningPowerCalculator.getNewEarningPower(
deposit.balance, deposit.owner, deposit.delegatee, deposit.earningPower
);
if (!_isQualifiedForBump || _newEarningPower == deposit.earningPower) {
revertGovernanceStaker__Unqualified(_newEarningPower);
}
if (_newEarningPower > deposit.earningPower && _unclaimedRewards < _requestedTip) {
revertGovernanceStaker__InsufficientUnclaimedRewards();
}
// Note: underflow causes a revert if the requested tip is more than unclaimed rewardsif (_newEarningPower < deposit.earningPower && (_unclaimedRewards - _requestedTip) < maxBumpTip)
{
revertGovernanceStaker__InsufficientUnclaimedRewards();
}
Otherwise, the call will revert because of an underflow or a custom error. But if the reward is very small, then there is a clear lack of incentives to call this function.
Impact
Some deposits’ earning power will not be updated by bumpers, which can lead to problems in the protocol’s accounting.
In order to mitigate this issue, the protocol should implement a function that batches the protocol IDs in order to bump the earning power of many deposits at the same time and share the tip paid proportionally.
The text was updated successfully, but these errors were encountered:
Rich Smoke Cheetah
Medium
Lack of incentives to call bumpEarningPower for small rewards
Summary
Since the tip that will be received in the
bumpEarningPower
function must be less or equal to the minimum between the unclaimed fees and the maxBumpTip, if the rewards are too small, there is a lack of incentives to call this function.Vulnerability Detail
Here we can see that the tip that will be received in the
bumpEarningPower
must be less or equal to the minimum between the unclaimed fees and the maxBumpTip in the bumpEarningPower function.Otherwise, the call will revert because of an underflow or a custom error. But if the reward is very small, then there is a clear lack of incentives to call this function.
Impact
Some deposits’ earning power will not be updated by bumpers, which can lead to problems in the protocol’s accounting.
Code Snippet
https://github.com/sherlock-audit/2024-11-tally/blob/main/staker/src/GovernanceStaker.sol#L483-L500
Tool used
Manual Review
Recommendation
In order to mitigate this issue, the protocol should implement a function that batches the protocol IDs in order to bump the earning power of many deposits at the same time and share the tip paid proportionally.
The text was updated successfully, but these errors were encountered: