_depositLiquidity() will never run in else statement because amount will never be 0(Zero) in stakingPool:deposit()
In stakingPool::deposit(), if amount > 0 then tokens are transfered to the pool & shares are minted but if amount = 0 then only _depositLiquidity() is called.
The problem is, amount will never be 0(zero). Let's see how
So, deposit() is called by priorityPool:_deposit() and if you see the amount parameter for deposit(), it is calculated based on toDeposit & canDeposit value, which will never be 0(zero) as there are checks to prevent that. As result, toDepositIntoPool(amount) will never be 0(zero)
_depositLiquidity() in the else statement will never be called because amount is never zero(0)
Manual Review
Remove the if-else statement
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.