Can you spot the vulnerability?
The `executeSelfLiquidate` function allows creditors to exit early by repaying debt and claiming collateral. It checks eligibility, applies pro-rata fees, burns debt, and transfers collateral.
But the collateral math might be giving early creditors more than their share.
The key operations involve:
• Liquidation Eligibility: Creditor must be at a loss (debt > collateral).
• Pro-Rata Fees: Borrower pays fees based on each creditor’s debt share.
• Collateral Assignment: Creditor receives collateral proportional to their share of the debt.
Think you’ve got the answer? We’ll post the solution on Friday.