When a user createMarketOrder(), the tradingAccount.validatePositionsLimit() check ensures that the user does not exceed the maxPositionsPerAccount limit. If the limit is exceeded, it reverts the order creation transaction.
However, the issue is that offchain orders do not have such restrictions, which allows traders to create as many positions as they want under their tradingAccountId. A malicious user could sign different OffchainOrder.Data under different marketId instead of calling OrderBranch.createMarketOrder(), allowing them to bypass the position limit check on their trades.
An account can have limitless open position under different markets
Manual review
Add following snippet to thefillOffchainOrder() function of SettlementBranch.sol,
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.