OrderBook::setAllowedSellToken function while orders are active causing user inconvenience.The OrderBook::setAllowedSellToken function allows the owner to disable a sell token at any time, without checking whether users currently have open orders involving that token.
This introduces a scenario where the owner can disable a market sell token while users still have open orders
Likelihood:
This happens when owner disables a sell token via the OrderBook::setAllowedSellToken function.
Impact:
Disabling a token while active orders exist causes the token to disappear from the frontend when it is excluded based on allowedSellToken[_token] status. This results in open orders becoming inaccessible through the user interface, leading to user confusion and interrupted trading activity.
Add this test to TestOrderBook.t.sol
It demonstrates that the contract owner can disable a sell token while active orders are still open
Track the number of active orders per token directly during order creation and cancellation.
Then disallow disabling of sell token while orders are still open in the OrderBook::setAllowedSellToken function
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.