MartenitsaToken::transferFrom
Functions are not Overriden and as a Result When Using Them MartenitsaToken::countMartenitsaTokensOwner
State Variables For New and Previous Owners Does not UpdateDescription: The MartenitsaToken
contract does not override the safeTransfer
and safeTransferFrom
functions inherited from the ERC721 standard. As a result, when these functions are used to transfer tokens, the countMartenitsaTokensOwner
state variables for both the new and previous owners do not get updated correctly.
Impact: This issue can significantly affect the functionality and integrity of the MartenitsaToken
contract, as it relies on accurate tracking of token ownership to manage token transfers and interactions. Incorrect updates to the countMartenitsaTokensOwner
state variables can lead to:
Misrepresentation of token ownership, affecting the value and utility of tokens.
Inability to accurately distribute rewards ( such as healthToken
) or perform other token-related operations based on ownership.
Potential for fraud or manipulation, as the contract's reliance on accurate ownership data is compromised.
Proof of Concept: Add the code below to your test suit:
Recommended Mitigation: To fix this issue override the safeTransferFrom
function and make it so it updates the countMartenitsaTokensOwner
before transfering it to others.
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.