A single user or group of users with offchain orders can cause unnecessary DOS of other unsuspecting users with offChainOrders to the same marketId
Offchain orders provide a means for users to create orders offchain, sign them then broadcast these to the zaros network which uses keepers to execute these orders.
The keepers take all signed offchain orders to a single marketId and fill them within a loop.
However, due to the nature of executing these orders within a loop, an error in one of the orders would cause a failure in filling all orders. These may be unintentional or malicious. One of these errors which can be manipulated by a user to DOS offchain orders filling is the check for offchainOrder nonce.
Users can cancel their offchain orders at any time by calling OrderBranch.cancelAllOffchainOrders. This increments the tradingAccount nonce such that all offchain orders for that tradingAccount become invalid
The user may DOS the fillOrder operation by waiting for the keeper to pick up their order and call fillOffchainOrders. By frontrunning this call, they cause this action of the keeper to fail. Note that there're other simple methods the user or group of users can achieve this DOS. Also, this can be kept up for as long as necessary by using numerous trading accounts with offchainorders and targetted to as many markets as the attacker intends.
Offchain orders can be DOSsed for as long as an attacker intends. All active markets can be affected and this is a cheap and simple exploit to carry out. Due to failure of filling offchain orders, normal operations of the zaros protocol would fail and users may even fall into liquidation or lose funds.
Manual Review
Instead of reverting, consider using continue such that the order is skipped. This can be done for other points of failure too
If you send 1 cancel and 1 create it should still run the cancel, not revert everything.
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.