The updateMarket
function is supposed to update market details "when settlement time has passed," but it does not include any logic to check if the settlement time has indeed passed.
Lines 120-126
The variables _tge
(Token Generation Event) and _settlementPeriod
are set within the function itself, which means there is no pre-existing condition to determine if the settlement time has passed.
Manual review
Add a Check for Settlement Time by introducing a mechanism to track the last update time and compare it with the current time to ensure the settlement period has passed.
If _tge
and _settlementPeriod
are already part of the market's state, use them to validate the settlement period before allowing an update.
An example fix to the problem is as follows:
The following issues and its duplicates are invalid as admin errors/input validation/malicious intents are1 generally considered invalid based on [codehawks guidelines](https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity#findings-that-may-be-invalid). If they deploy/set inputs of the contracts appropriately, there will be no issue. Additionally admins are trusted as noted in READ.ME they can break certain assumption of the code based on their actions, and
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.