Submitted by TrungOre
LPFarming.sol#L214
LPFarming.sol#L107
A part of reward tokens will be locked in the farming pool if no user deposits lpToken at the epoch.startBlock.
In the example above, I create an epoch from blockNumber + 1 to blockNumber + 11 with the reward for each block being 100JPEG. So, the total reward for this farm will be 1000JPEG. When I skip the epoch.startBlock and let Alice deposit 100 lpToken at the block right after, at the end of the farm (epoch.endBlock), the total reward of Alice is just 900JPEG, and 100JPEG still remains in the farming pool. Since there is no function for the admin (or users) to withdraw the remaining, 100JPEG will be stucked in the pool forever !!!
typescript
Add a new function for the admin (or user) to claim all rewards which remained in the pool when epoch.endTime has passed
spaghettieth (JPEGd) acknowledged, but disagreed with Medium severity and commented:
LSDan (judge) commented:
