Skip to content

Commit

Permalink
dust rounding
Browse files Browse the repository at this point in the history
  • Loading branch information
wildmolasses committed Apr 9, 2024
1 parent 2ac42a5 commit 09ab194
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/UniStaker.sol
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,8 @@ contract UniStaker is INotifiableRewardReceiver, Multicall, EIP712, Nonces {

uint256 _reward = scaledUnclaimedRewardCheckpoint[_beneficiary] / SCALE_FACTOR;
if (_reward == 0) return;
scaledUnclaimedRewardCheckpoint[_beneficiary] = 0;
scaledUnclaimedRewardCheckpoint[_beneficiary] =
scaledUnclaimedRewardCheckpoint[_beneficiary] - (_reward * SCALE_FACTOR);
emit RewardClaimed(_beneficiary, _reward);

SafeERC20.safeTransfer(REWARD_TOKEN, _beneficiary, _reward);
Expand Down

0 comments on commit 09ab194

Please sign in to comment.