Submitted by unforgiven
https://github.com/code-423n4/2022-05-vetoken/blob/2d7cd1f6780a9bcc8387dea8fecfbd758462c152/contracts/BaseRewardPool.sol#L327-L345
https://github.com/code-423n4/2022-05-vetoken/blob/2d7cd1f6780a9bcc8387dea8fecfbd758462c152/contracts/VE3DRewardPool.sol#L367-L384
Function notifyRewardAmount() calculates rewardRate for reward token/s in VE3DRewardPool and BaseRewardPool. to calculate rewardRate it divides reward amount to duration but because of the rounding error in division, some of reward amount wouldnt get distributed and stuck in contract (rewardRate * duration < reward). and contract dont redistributes them or dont have any mechanism to recover them. This bug can be more damaging if the precision of rewardToken is low or token price is high.
This is notifyRewardAmount() code in BaseRewardPool: (contract VE3DRewardPool is similar)
As you can see it sets rewardRate = reward.div(duration); and this is where the rounding error happens. and even if contract distributes all in all the duration it will distribute rewardRate * duration which can be lower than reward and the extra reward amount will stuck in contract. This is queueNewRewards() code which calls notifyRewardAmount():
As you can see it queues rewardToken  and when the reward amount reach some point it calls notifyRewardAmount() and set queuedRewards  to 0x0. notifyRewardAmount() will set rewardRate based on reward amount but because of the rounding error some of the reward token 0 =< unused < duration will stuck in contract and pool will not distribute it. if the token has low precision or has higher price then this amount value can be very big because notifyRewardAmount() can be called multiple times.
VIM
add extra amount to queuedRewards so it would be distributed on next notifyRewardAmount() or add other mechanism to recover it.
solvetony (veToken Finance) disagreed with severity and commented:
Alex the Entreprenerd (judge) decreased severity to Medium and commented:
