Submitted by gpersoon, also found by 0xabc, csanuragjain, harleythedog, kenzo, and leastwood
When claiming rewards via claimRewards(), the function \_calculateRewardAmount() is called.
The function \_calculateRewardAmount() has a check to make sure the epoch is over
However neither functions check if the \_epochId is within the range of the reward epochs.
Ergo it is possible to continue claiming rewards after the reward period is over.
This only works as long as there are enough tokens in the contract. But this is the case when not everyone has claimed, or other rewards use the same token.
The proof of concept contains a simplified version of the contract, and shows how this can be done.
When run in remix you get the following output, while there is only 1 epoch.
console.log: Claiming for epoch 1 1 Claiming for epoch 2 1 Claiming for epoch 3 1 Claiming for epoch 4 1 Claiming for epoch 5 1
In the function \_calculateRewardAmount() add something like the following in the beginning after the require.
if ( \_epochId >= \_promotion.numberOfEpochs) return 0;
PierrickGT (PoolTogether) confirmed
