Missing Pausability Check in OstiumTrading::executeAutomationOrder() for Opening Orders
Description
The execution of a limit order within the OstiumTrading::executeAutomationOrder() function lacks a check to determine if the contract is paused.
Recommendation
if (orderType == IOstiumTradingStorage.LimitOrder.OPEN) {
if (!storageT.hasOpenLimitOrder(trader, pairIndex, index)) {
return IOstiumTrading.AutomationOrderStatus.NO_LIMIT;
}
+
isNotPaused();
IOstiumTradingStorage.OpenLimitOrder memory l = storageT.getOpenLimitOrder(trader, pairIndex, index);
leveragedPos = l.collateral * l.leverage / 100;
}Status
Addressed in #fa95bb0.