The SystemConfig::updateMarket
function allows setting settlement periods outside the intended 24-72 hour range, contradicting the documentation and potentially causing issues for users
Docs:
In SystemConfig::updateMarket
, there's no validation that the _settlementPeriod
parameter falls within the 24-72 hour range specified in the documentation. This oversight allows setting arbitrary settlement periods.
Two cases happen:
Too Short Settlement Period: If set unrealistically low, sellers may face penalties due to insufficient time to settle.
Too Long Settlement Period: If set extremely high, it could allow sellers to indefinitely delay settlement, potentially griefing buyers.
PoC:
Foundry
Add a check that settlementPeriod
is within 24-72 hours and a custom error:
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.