If the pool balance is smaller than the amount planned to remove from the pool, the transaction will revert.
In the function removeFromPool() on Lender.sol user is passing as parameter uint256 amount, which is then subtracted from the pool balance in the operation:
The problem is that there is no check to validate that the poolBalance of the specified pool is bigger than the requested amount to remove.
The transaction will revert unexpectedly for underflow if this situation happens.
None
Add a validation before updating the balance:
if (pools[poolId].poolBalance > amount) revert NotEnoughAmountInPool();
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.