Platform: Code4rena
Start Date: 24/10/2023
Pot Size: $36,500 USDC
Total HM: 4
Participants: 147
Period: 6 days
Judge: 0xDjango
Id: 299
League: ETH
Rank: 106/147
Findings: 1
Award: $4.52
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: 0xmystery
Also found by: 0x11singh99, 0xAadi, 0xAlix2, 0xG0P1, 0xStalin, 0xWaitress, 0x_Scar, 0xhacksmithh, 0xhunter, 0xpiken, Al-Qa-qa, Arz, Avci, Bauchibred, BeliSesir, Breeje, Bughunter101, DarkTower, Eeyore, Fitro, HChang26, Imlazy0ne, J4X, JCK, Kaysoft, Kral01, Madalad, Mike_Bello90, Noro, PASCAL, PENGUN, Proxy, Rickard, Shubham, SovaSlava, Strausses, Team_Rocket, ThreeSigma, Topmark, Udsen, Walter, Yanchuan, Zach_166, ZanyBonzy, adam-idarrha, adeolu, almurhasan, arjun16, ast3ros, asui, ayden, btk, cartlex_, castle_chain, cccz, chainsnake, codynhat, critical-or-high, cryptonue, csanuragjain, deepkin, degensec, dirk_y, erebus, foxb868, ge6a, hunter_w3b, jasonxiale, kkkmmmsk, lanrebayode77, lsaudit, marchev, matrix_0wl, max10afternoon, nuthan2x, oakcobalt, oxchsyston, pavankv, peanuts, pep7siup, pipidu83, pontifex, ptsanev, qpzm, radev_sw, rokinot, rotcivegaf, rvierdiiev, sorrynotsorry, squeaky_cactus, supersizer0x, tnquanghuy0512, twcctop, twicek, young, zhaojie, ziyou-
4.5226 USDC - $4.52
By not checking if the user has cooldown already set int cooldownAssets
and cooldownShares
we can get out of your exisitng cooldown when a owner sets the cooldown lower.The reason this is an issue is because if some yield that still hasnt provided for the existing cooldown users then the protocol might not be able to service the users who now can unstake earlier.
ex:
cooldownDuation=14 days
cooldownDuration=1 days
if (assets > maxWithdraw(owner)) revert ExcessiveWithdrawAmount(); uint256 shares = previewWithdraw(assets); cooldowns[owner].cooldownEnd = uint104(block.timestamp) + cooldownDuration; cooldowns[owner].underlyingAmount += assets; _withdraw(_msgSender(), address(silo), owner, assets, shares);
as we can see above their is no check that their is cooldown in progress so an attacker overide their cooldown
require(cooldowns[owner].cooldownEnd!=0)
this below enables that they have to wait even longer
cooldowns[owner].cooldownEnd = uint104(block.timestamp) + cooldownDuration + cooldowns[owner].cooldownEnd ;
Invalid Validation
#0 - c4-pre-sort
2023-11-01T00:50:32Z
raymondfam marked the issue as sufficient quality report
#1 - c4-pre-sort
2023-11-01T00:50:40Z
raymondfam marked the issue as duplicate of #29
#2 - c4-judge
2023-11-13T19:05:29Z
fatherGoose1 marked the issue as satisfactory
#3 - c4-judge
2023-11-17T02:45:06Z
fatherGoose1 changed the severity to QA (Quality Assurance)
#4 - c4-judge
2023-11-17T16:47:07Z
This previously downgraded issue has been upgraded by fatherGoose1
#5 - c4-judge
2023-11-27T20:00:09Z
fatherGoose1 changed the severity to QA (Quality Assurance)
#6 - c4-judge
2023-11-27T20:01:15Z
fatherGoose1 marked the issue as grade-b