In the refinance function, poolBalance of the poolId
is being reduced 2 times.
Notice that in the refinance function, when the borrower calls it, it is reducing the poolId's balance twice for the debt amount.
https://github.com/Cyfrin/2023-07-beedle/blob/658e046bda8b010a5b82d2d85e824f3823602d27/src/Lender.sol#L636
Then again:
https://github.com/Cyfrin/2023-07-beedle/blob/658e046bda8b010a5b82d2d85e824f3823602d27/src/Lender.sol#L698
The balance of the new pool will be decreased twice the debt amount.
Manual Review
Remove one of the updates.
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.