Skip to content
Request an audit

‹ All findings

Use of Magic Numbers

Low/InfoOstium·Three Sigma · RWA perpetuals DEX · 19th February, 20243S-OS-N06

Description

Several instances of magic numbers are present throughout the contracts:

  • The validation for slippageP in OstiumTrading::openTrade() on L169.
  • L117 in OstiumOpenPnl::getOpenPnl().
  • L401 in OstiumTrading::topUpCollateral().
  • L149 in OstiumTradingCallbacks::openTradeMarketCallback().
  • L446 in OstiumTradingCallbacks::registerTrade().

Recommendation

It is recommended to review the contracts and replace these magic numbers with constants for improved clarity. Not all instances of them are mentioned in the description.

Status

Acknowledged