The saveProfit
function internally handles profit updates for a given account
, but it lacks a check to validate if the provided account
is a non-zero address. If a zero address (address(0)
) is passed to the function, it could lead to unintended behavior, errors, or security vulnerabilities. Specifically, this could impact the calculations for profit tracking and potentially lead to funds being incorrectly saved or manipulated.
Issue: The function does not include a check to verify that the account
is a valid address (i.e., not address(0)
).
Allowing the zero address to be passed into the saveProfit
function without validation could:
Corrupt profit data by associating address(0)
with profit calculations, making it difficult to track profits correctly for actual accounts.
Manual Code Review: Analysis of the saveProfit
function revealed the lack of address validation.
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.