No position limit check for offchain orders.
For onchain orders, OrderBranch::createMarketOrder function has a check for new position size:
The comment of validatePositionsLimit shows this function must be called when the trading account is going to open a new position. But for offchain orders there is no such check. If a user open a new position using offchain orders, the position limit can be bypassed.
The position limit can be bypassed by opening a new position with offchain orders.
manual
Suggest adding tradingAccount.validatePositionsLimit in SettlementBranch::_fillOrder.
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.