It is specified in the contract logic that the players are allowed to withdraw the rewards only during the 90 days timeline and whenthe contest is up and running but it's possible for players to withdraw amount even after the contest is over as there is another logical flaw which makes some Tokens to be stuck in the contract itself.
There is a logical flaw in calculation of the claimantcut which results in tokens being stuck in the contract in addition to this there is a possibility for users to withdraw the stuck TOKENS even after the pot is closed. Actually according to the theoritical explaination of the contract once the pot is closed there shouldn't be any remaining TOKENS in contract and user shouldn't be able to claim any rewards.
Scenario coded for POC:
Four players are having rewards points each of values (500,300,150 and 50) respectively.
During the timeline for claiming rewards two players collected their rewards of 500 and 300 leaving 200 TOKENS to be available in the contract.
Once the manager calls the closeContest function 10% of the remaining Tokens will be transferred to the manager, and the claimantcut value becomes 45 (claimantcut =( remaning(200) - managerCut(20) )/ playersCount(4)).
After transferring the 45 TOKENS to both the claiments there will be remaining 90 tokens Stuck in the contest these should have been distributed as well.
Now the player4 who has 50 reward points can claim his share by calling the claimCut function as there is no logic to make the total rewards to zero after closing the contest or a condition to stop the player from withdrawing after 90 days.
-> Manual review.
-> Foundry.
There are three recommandations for this contract.
change claimentCut formula as follows:
2.Add a time check in the claimCut() function, It can be something similar to the below code.
3.Also add a logic to make the total rewards as zero in the end of closeContract function.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.