PriorityPool.sol uses queueDepositMin to validate the minimum amount of tokens deposited to Staking Pool during automated calls of _depositQueuedTokens & otherwise the caller can meniton the _depositMin but both the times it is bypassed as the check in the _depositQueuedTokens function is wrong .
PriorityPool.sol uses
https://github.com/Cyfrin/2024-09-stakelink/blob/main/contracts/core/priorityPool/PriorityPool.sol#L39C3-L40C36
to monitor minimum amount deposited to Staking Pool here -
https://github.com/Cyfrin/2024-09-stakelink/blob/main/contracts/core/priorityPool/PriorityPool.sol#L437C2-L440C6
but when calling _depositQueuedTokens function it is actually checking it with deposit room of Strategy and with sum of _totalQueued + unusedDeposits but instead it should be checking it against toDepositFromQueue which is the actual amount that is send to Staking Pool from Priority Pool and not the others mentioned -
https://github.com/Cyfrin/2024-09-stakelink/blob/main/contracts/core/priorityPool/PriorityPool.sol#L701C7-L717C1
Amounts smaller than _depositMin can be send from PriorityPool.sol bypassing the minimum deposit amount check, which should have been skipped .
Manual Review
Add this check to _depositQueuedTokens function after calculation of toDepositFromQueue
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.