Platform: Code4rena
Start Date: 11/12/2023
Pot Size: $90,500 USDC
Total HM: 29
Participants: 127
Period: 17 days
Judge: TrungOre
Total Solo HM: 4
Id: 310
League: ETH
Rank: 101/127
Findings: 1
Award: $30.41
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: neocrao
Also found by: 0xStalin, Aymen0909, Byteblockers, Chinmay, The-Seraphs, TheSchnilch, Timenov, Varun_05, ether_sky, kaden, mojito_auditor, mussucal, nonseodion, rbserver, santipu_, thank_you, twcctop
30.4141 USDC - $30.41
The last comment in debtCeiling
functions states: return min(creditMinterBuffer, hardCap, debtCeiling)
. However there is an edge case that does not return the smallest of the three parameters.
Lets assume the following values:
creditMinterBuffer = 2
,
_debtCeiling = 3
,
_hardCap = 1
The first check in line 324 is if (creditMinterBuffer < _debtCeiling)
. We pass this and the function returns 2
.
Manual Review
Add additional checks in the if statements,
if (creditMinterBuffer < _debtCeiling && creditMinterBuffer < _hardCap) { return creditMinterBuffer; } if (_hardCap < _debtCeiling && _hardCap < creditMinterBuffer) { return _hardCap; } return _debtCeiling;
Math
#0 - c4-pre-sort
2024-01-05T17:12:18Z
0xSorryNotSorry marked the issue as sufficient quality report
#1 - c4-pre-sort
2024-01-05T17:12:38Z
0xSorryNotSorry marked the issue as duplicate of #708
#2 - c4-judge
2024-01-28T19:46:57Z
Trumpero marked the issue as satisfactory