Skip to content
Request an audit

‹ All findings

OstiumTrading::closeTradeMarket() and OstiumTrading::topUpCollateral() are missing pending trigger checks

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

Description

OstiumTrading::closeTradeMarket() and OstiumTrading::topUpCollateral() can be used to frontrun liquidation calls whose trigger has already been set, making the liquidation fail in OstiumPriceUpKeep::performUpkeep(), draining fees and gaming the system.

Recommendation

Add OstiumTrading::checkNoPendingTrigger() to both functions.

Status

Addressed in #7a80be7.