A borrower can get his interest rate increased before his borrow tx goes through, with no way to cancel it, meaning he can lose funds even if he tries to immediately repay. There is the scenario of him not being able to immediately even repay due to miner(staker) manipulation.
Also note that this kind of interest change before borrow can happen accidentally.
Loss of funds for a borrower due to the potential maliciousness of the lender
Manual Review
Allow the borrower to specify the interest rate at which he wants to borrow as a kind of slippage check.
To mitigate this you can add a parameter to the Borrow struct:
Then you can add to borrow():
if (pool.interestRate != borrows[i].interestRate) revert PoolConfig();
or
if (pool.interestRate > borrows[i].interestRate) revert PoolConfig();
since a lender can lower the interest, which wouldn't lead to unknown material loss
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.