function updateCountMartenitsaTokensOwner is not protected; anyone can call this function to increase or decrease countMartenitsaTokensOwner.
A user can call countMartenitsaTokensOwner to add or subtract Martenitsa Token, the user will be able to call this function 60 times and after can collect 10 HealthToken for free, without buying any MartenitsaToken.
Add the code below in the Contract MartenitsaToken.t.sol and run the command:
An attacker with 0 HealthToken and 0 MartenitsaToken can update his own number of MartenitsaToken by calling the function martenitsaToken.updateCountMartenitsaTokensOwner(attacker, "add") several times.
He can collect HealthToken for free by calling the method marketplace.collectReward():
Users can increase their MartenitsaToken count to get unlimited HealthToken.
Users can decrease the MartenitsaToken count of any other user, so this user won't be able to collect their HealthToken.
User can also partcipate to the MartenitsaEvent for free by having more than 10 health Token
Manual Review and Foundry test
function updateCountMartenitsaTokensOwner(address owner, string memory operation) external should be only callable by MartenitsaMarketplace.
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.