Summary

During repayment, the fee transfer could remove more collateral than the accounting recorded. The amount sent to the fee receiver and the amount deducted from a borrower’s recorded collateral did not agree.

Root cause

The internal collateral adjustment and the outgoing fee transfer used different amounts. Although the accounting calculated a percentage-based charge, the transfer did not apply that same fee calculation.

Attack scenario

The published report describes a failure during ordinary repayment, without requiring a specially privileged attacker. A borrower could complete a normal action while the contract moved an excessive amount of collateral to the fee receiver.

Impact

Users could be overcharged and the contract could hold less collateral than its records indicated. That imbalance would affect the reliability of balances used elsewhere in the lending system.

Fix recommendation

Use one calculated fee amount for both the collateral deduction and the token transfer. Regression tests should reconcile user accounting, contract balances, and fee-receiver balances after repayments.