poolBalance
is being deducted twice in refinance function
when calling refinance function the pool balance is updated from old and new once also , but the debt is deducted twice from new poolbalance
first the debt is deducted here:
https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Lender.sol#L636
second :
https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Lender.sol#L698
This will break the ratio between poolbalance
and outstandingLoans
.
poolbalance
is deducted twice with debt which will cause lender to loose funds from his pool
vs
function should only deduct poolbalance once
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.