The MartenitsaToken.sol::updateCountMartenitsaTokensOwner
function can be called by anyone and the count of MartenitsaTokens owned can be manipulated.
The MartenitsaToken.sol::updateCountMartenitsaTokensOwner
function has no protections of who can call it. This means that anyone can call the function and either add or subtract from their own or anyone else's count of MartenitsaTokens in the countMartenitsaTokensOwner
mapping.
Because of this vulnerability, this means that in the MartenitsaMarketplace.sol::collectReward
function, anybody that is not a producer can claim HealthTokens regardless of how many MartenitsaTokens they actually own.
This test passes showing that anyone can update their own count of MarenitsaTokens and claim the HealthTokens
--Foundry
It is recommended to add protections to the MartenitsaToken.sol::updateCountMartenitsaTokensOwner
function so that only the MartenitsaMarketplace contract can call it.
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.