Anyone can invoke the deposit() function in PriorityPool.sol, where any _amount greater than 0 is permitted for depositing. Subsequently, when totalQueued equals 0 and queuedWithdrawals are not 0, users can call withdrawalPool.deposit(toDepositIntoQueue) to submit an invalid WithdrawalBatch into withdrawalBatches.
When the function _finalizeWithdrawals(_amount) is called in WithdrawalPool.sol without a minimum deposits check, depositing one cent of a token can result in uint256 sharesToWithdraw = _getSharesByStake(_amount) returning 0. This occurs because queuedWithdrawals[0].sharesRemaining is 0, leading to the addition of WithdrawalBatch(uint128(0), uint128(_getStakeByShares(1 ether))) into withdrawalBatches.
wrongly calculated withdrawalBatches
Manual code review
Add a minimum deposits check to deposit(uint256 _amount, bool _shouldQueue, bytes[] calldata _data) in PriorityPool.sol.
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.