Skip to content
Request an audit

‹ All findings

Missing Pausability Check in OstiumTrading::executeAutomationOrder() for Opening Orders

MediumOstium·Three Sigma · RWA perpetuals DEX · 19th February, 20243S-OS-M02

Description

The execution of a limit order within the OstiumTrading::executeAutomationOrder() function lacks a check to determine if the contract is paused.

Recommendation

solidity
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.