Platform: Code4rena
Start Date: 21/08/2023
Pot Size: $125,000 USDC
Total HM: 26
Participants: 189
Period: 16 days
Judge: GalloDaSballo
Total Solo HM: 3
Id: 278
League: ETH
Rank: 124/189
Findings: 1
Award: $24.08
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: Toshii
Also found by: 0x3b, 0xDING99YA, 0xmystery, Cosine, Jiamin, Juntao, Matin, Qeew, Topmark, catwhiskeys, circlelooper, crunch, deadrxsezzz, eeshenggoh, lsaudit, peakbolt, pep7siup, piyushshukla, qpzm, visualbits
24.0823 USDC - $24.08
roundUp function results in incorrect rounding behavior when the remainder is greater than the _strike value. This issue may lead to incorrect calculations
The roundUp function in the contract does not correctly round up the _strike value when the remainder is greater than _strike. This leads to incorrect results in cases where the remainder is greater than _strike
function roundUp(uint256 _strike) public view returns (uint256 strike) { uint256 remainder = _strike % roundingPrecision; if (remainder == 0) { return _strike; } else { return _strike - remainder + roundingPrecision; } }
mannual
Modify the roundUp function to handle cases where the remainder is greater than _strike by adding the difference between roundingPrecision and the remainder to _strike
Math
#0 - c4-pre-sort
2023-09-09T10:10:57Z
bytes032 marked the issue as duplicate of #2083
#1 - c4-pre-sort
2023-09-12T04:43:50Z
bytes032 marked the issue as sufficient quality report
#2 - c4-judge
2023-10-20T14:12:53Z
GalloDaSballo marked the issue as partial-25
#3 - c4-judge
2023-10-21T07:54:11Z
GalloDaSballo changed the severity to 3 (High Risk)