isActive onchain when they expire, this can mislead off-chain systems relying on order statusThe OrderBook contract does not mark expired orders as inactive once their deadlineTimestamp has passed. As a result, expired orders still return isActive == true even though they can no longer be filled. This causes inconsistency between the order’s actual status and its isActive flag.
Likelihood:
This will occur when an order's deadlineTimestamp has passed. The order will remain flagged as isActive indefinitely, even though it is no longer fillable.
Impact:
Off-chain systems and frontends relying on isActive may incorrectly display expired orders as valid, leading to misleading user interface behavior and incorrect analytics.
This invariant test, designed to ensure that all expired orders retain their corresponding sell token balances within the contract, revealed a critical inconsistency. Orders with a deadlineTimestamp in the past remain flagged as isActive == true, despite having clearly expired on-chain.
The test reveals that the isActive flag does not reflect the expiration status, expired orders still appear active even though they cannot be filled on chain due to deadline enforcement
Use Chainlink Automation to periodically scan and cancel orders whose deadlineTimestamp has passed.
The `buyOrder()` function checks if an order is expired but fails to update the `isActive` flag when reverting, causing expired orders to remain marked as active in storage.
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.