Skip to content
Request an audit

‹ Findings database

utilizationThresholdP of 10_000 will make OstiumPairInfos::_getUtilizationOpeningFee() divide by 0

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

Description

utilizationThresholdP should never be set to the max 10_000 or it will lead to division by 0 when calling OstiumPairInfos::_getUtilizationOpeningFee().

Recommendation

Add an equality restriction to utilizationThresholdP:

solidity
if ( ...
|| value.utilizationThresholdP >= MAX_USAGE_THRESHOLDP ... //@audit
note the = ) {
revert WrongParams();
}

Status

Addressed in #4c774b3.