The updateMarket function in the SystemConfig contract does not adequately check whether the provided settlement period has already passed. This oversight allows the possibility of setting a settlement period that has already expired, leading to potential logic errors and unintended behavior in the marketplace operations.
The _settlementPeriod parameter is set without checking if its value is in the future relative to the current block timestamp.
This can lead to markets being updated with settlement periods that have already expired, causing logic errors.
The absence of a validation check to ensure the _settlementPeriod is set to a future date allows users to specify already expired periods.
Incorrect settlement periods may lead to inaccurate calculations and distributions, potentially causing financial losses for users and the platform. The presence of expired settlement periods can create inconsistencies in the market's state. Settlement period is crucial parameter used in critical functions throughout the protocol.
Manual review
Add a validation check to ensure the _settlementPeriod is set to a future timestamp, preventing the possibility of expired periods being specified.
Since the function can only be called by the owner and he is aware of this I consider this issue as a Low severity but ensure that the settlement period is validated against the current block timestamp to confirm it is set appropriately for future market activities.
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.