isValidPercantage does not check how much is the percantage value is to be set but only checks if the given number is between 0 and 100.When a value is passed inside the modifier, it only checks to see if the given number is between the range of 0 and 100 which is correct for a percantage value but this could lead to any number between 0 to 100 which could cause complete deduction in rewards . Even if the owner is trusted person, this could happen by mistake and can lead to 0 rewards in some cases.
Generally, for any place in the contract where a percantage value is needed it would work efficiently.
However, if 100 is passed in for 100% of deduction in the amount, this could lead to zero rewards for users making protocol untrust worthy.
Likelihood: LOW
Only happens when the owner of the contract does this and owner is trusted in most of the cases.
But could be very dangerous if the owener is not a trusted person.
Impact: HIGH/MEDIUM
Can lead to loss of rewards for the user
Creating a very bad impression of the Game to the user.
In the test function below, we can see that if owners set the platformPercantageFee which is later validated using isValidPercantage modifier, this causes protocol take the entire amount as the platform fee and adding no amount to winning pot. Similar for all the other functions where isValidPercantage is used .
With this approach, In different functions like updatePlatformFeePercentage and updateClaimFeeParameters we can set different and realistic percantage value within the minimum or maximum range.
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.