From e7181c26d5aeac73b0c43e63c487c86e298b7b2d Mon Sep 17 00:00:00 2001 From: wildmolasses Date: Wed, 10 Apr 2024 11:12:41 -0400 Subject: [PATCH] add comment --- src/UniStaker.sol | 1 + 1 file changed, 1 insertion(+) diff --git a/src/UniStaker.sol b/src/UniStaker.sol index 3f928d0..3dd70a3 100644 --- a/src/UniStaker.sol +++ b/src/UniStaker.sol @@ -802,6 +802,7 @@ contract UniStaker is INotifiableRewardReceiver, Multicall, EIP712, Nonces { uint256 _reward = scaledUnclaimedRewardCheckpoint[_beneficiary] / SCALE_FACTOR; if (_reward == 0) return; + // retain sub-wei dust that would be left due to the precision loss scaledUnclaimedRewardCheckpoint[_beneficiary] = scaledUnclaimedRewardCheckpoint[_beneficiary] - (_reward * SCALE_FACTOR); emit RewardClaimed(_beneficiary, _reward);