MartenitsaMarketplace::collectReward
distribute rewards according the number of MartenitsaToken
owned by the caller.
Problem is that _collectedRewards
is not increased but reset by amountRewards
. For example, a user with 3 tokens will call the function to have a reward and if they buy again 3 token, call collectReward
again, the amountRewards
will be 1 (because reward has already been collected) and set the _collectedRewards
back to 1 instead of 2. A malicious user can now continue calling collectReward
to earn infinite HealthToken
.
Likelyhood:
Anyone, Anytime : cost 6 MartenitsaToken
Impact:
Infinite HeathToken minting
Increase _collectedRewards
instead of replacing 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.