Skip to content
Request an audit

‹ All findings

OstiumTrading::executeAutomationOrder() and _getLimitOrdersToTrigger() should check isPaused for open limit orders

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

Description

OstiumTrading::openTrade() correctly checks isPaused to not allow opening positions when the protocol is paused. However, executeAutomationOrder() still allows execution if it is an open limit order, which it should not, as it will fail when OstiumPriceUpKeep()::performUpKeep() executes.

Moreover, it will not discount oracle fees if it is paused or the market has been closed.

Recommendation

Check if OstiumTradingCallbacks is paused in OstiumTradingUpKeep() and in OstiumTrading::executeAutomationOrder() for open limit orders.

Status

Acknowledged