Extending/reducing cooldown period affects already queued withdrawals #609
Labels
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
duplicate-607
grade-b
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
🤖_31_group
AI based duplicate group recommendation
sufficient quality report
This report is of sufficient quality
Lines of code
https://github.com/code-423n4/2024-04-renzo/blob/519e518f2d8dec9acf6482b84a181e403070d22d/contracts/Withdraw/WithdrawQueue.sol#L287
Vulnerability details
Descritpion
Whene users initiated a withdrawl they are expecting to wait until current cooldown period ends to be able to claim their funds. However if the current cool down period is modified, this will affect this time.
Impact
Arbitrary extension of cooldown period can affect users that are waiting for their funds to be available.
POC
Call of
WitdrawQueue.updateCoolDownPeriod(uint256 _newCoolDownPeriod)
will affect current queued withdrawls extending their duration ofcoolDownPeriod < _newCoolDownPeriod
given current implementation of functionclaim
Recommended mitigation
Record the current cooldown period when a user initiate a withdrawl and use this value to calculate the time when the funds will be available to claim.
Assessed type
Other
The text was updated successfully, but these errors were encountered: