The _minWithdrawalAmount parameter in WithdrawalPool::setMinWithdrawalAmount is not validated, allowing it to be set to a very small amount or zero. This can lead to abuse by cluttering the queuedWithdrawals and queuedWithdrawalsByAccount arrays, potentially causing a Denial of Service (DoS) when _finalizeWithdrawals is called.
there are missing _minWithdrawalAmount validation and if the value are too small (like 10 instead of 10e18) would lead to abuse/griefing the system by cluttering the queuedWithdrawals and queuedWithdrawalsByAccount array, potentially leading to DOS when performing huge amount of withdrawal array when performing _finalizeWithdrawals function.
the setup:
the requirement for the attack is to let toWithdraw > 0 when calling withdraw function and later _withdraw in PriorityPool. use 10 wei for example.
after the function would call withdrawalPool.queueWithdrawal with toWithdraw equal to 10. and this can be done multiple times with relative cheap.
when user call function that leads to _finalizeWithdrawals, it would iterate to the queuedWithdrawals and with the huge amount of the array there would be potentially out of gas scenario leading to the DoS
DoS when _finalizeWithdrawals is called by function deposit and performUpkeep, rendering the contract unusable
manual review
add the validation for _minWithdrawalAmount with minimum of reasonable amount of token so it would be costly to perform such attack.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.