function:collectReward
in MartenitsaMarketplace
contract Is used to collect Health Tokens by users. As 1 Health Token is given 3 different Martenitsa tokens, _collectedRewards
mapping keeps track of rewards collected by a user. This mapping should be updated everytime by adding amountRewards
variable to it, but instead it is reassigned. This mathematical error, wrongfully calculates rewards collected and hence sends wrong reward amounts.
Manual review
change the following line in function:collectReward
:
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.