User/producer can transfer their MartenitsaToken
without updating their countMartenitsaTokensOwner
variable which leads to gaining more HealthTokens
As MartenitsaToken
has ERC721 token standard, any user can transfer their tokens using transferFrom
or safeTransferFrom
functions. Malicious Users/producers can use these functions to transfer their MartenitsaTokens to their new addresses. As countMartenitsaTokensOwner
variable in not updated when using these functions, malicious actors can use this to gain more HealthTokens than intended by accessing collectReward
function.
MartenitsaMarketplace
contract will lose it's meaning as producers will only want to create their MartenitsaTokens
and transfer them to their new addresses. There will be no market for users to buy MartenitsaTokens. Also, HealthTokens
will be minted more than intended by the protocol.
Manual Review
There are 2 ways to resolve this:
Add MartenitsaToken::updateCountMartenitsaTokensOwner
function in transferFrom
, safeTransferFrom
functions such that even if any malicious actor uses these functions, their countMartenitsaTokensOwner
variable is also updated.
Add revert statement in transferFrom
, safeTransferFrom
functions such that every time these functions are called, they will be reverted. Thus, making transfer of tokens impossible for any user be it malicious or not.
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.