The Repaid
event in the refinance
functino emits the wrong parameters.
https://github.com/Cyfrin/2023-07-beedle/blob/658e046bda8b010a5b82d2d85e824f3823602d27/src/Lender.sol#L676
The debt
parameter should be replaced by the value of loan.debt
before it is updated at line 659.
The collateral
parameter should be replaced by loan.collateral
.
Events with wrong parameter can be misinterpreted by the frontend.
Manual review
The event should be emitted before the state change of Line 659 and apply the modifications indicated.
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.