The getFinalizedWithdrawalIdsByOwner
function calls getBatchIds
, which iterates over the withdrawalBatches
. The protocol uses withdrawalBatchIdCutoff
to minimize the number of iterations. However, this approach may fail if someone, either intentionally or due to oversight, doesn't claim their tokens from the withdrawal pool.
The updateWithdrawalBatchIdCutoff
function allows updating the withdrawalBatchIdCutoff
, but this will only happen if all withdrawals from a batch have been collected. If someone fails to withdraw their tokens, whether intentionally or unintentionally, the cutoff won't be updated.
This function is used only within view functions. However, even off-chain processing might fail if there are too many batches.
It's also worth mentioning that the creation of new batches is not restricted by minTimeBetweenWithdrawals
, as new batches can be created when there are items in the withdrawal queue and a user makes a deposit to the staking pool.
Manula Review
It's not that easy to fix, but in can be fixed by paging batches. getFinalizedWithdrawalIdsByOwner
might be accepting page number for batches as a parameter.
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.