diff --git a/src/UniStaker.sol b/src/UniStaker.sol index 026aa26..3dd70a3 100644 --- a/src/UniStaker.sol +++ b/src/UniStaker.sol @@ -802,7 +802,9 @@ contract UniStaker is INotifiableRewardReceiver, Multicall, EIP712, Nonces { uint256 _reward = scaledUnclaimedRewardCheckpoint[_beneficiary] / SCALE_FACTOR; if (_reward == 0) return; - scaledUnclaimedRewardCheckpoint[_beneficiary] = 0; + // retain sub-wei dust that would be left due to the precision loss + scaledUnclaimedRewardCheckpoint[_beneficiary] = + scaledUnclaimedRewardCheckpoint[_beneficiary] - (_reward * SCALE_FACTOR); emit RewardClaimed(_beneficiary, _reward); SafeERC20.safeTransfer(REWARD_TOKEN, _beneficiary, _reward);