Fig. 9 Aave Aave

Flux de Remboursement de Prêt

Repay loan with debt reduction and interest payment
Repay loan with debt reduction and interest payment

Context

This figure appears in Section 3.4 'Repay' and illustrates the workflow for a borrower to reduce or fully close their outstanding loan position. Repayment covers the principal, accrued interest, and origination fee. The diagram shows the sequence of debt reduction and collateral unlocking steps.

What This Figure Shows

The Repay Loan workflow is triggered when a user calls repay() on the LendingPool, specifying a reserve and the amount to repay — which can be a partial or full repayment. The contract first computes the user's current compounded borrow balance (Bxc), which includes the principal (Bx) plus accumulated interest using either the cumulated variable borrow index or the stable rate compounding formula. The origination fee is settled separately. After validating the repayment amount, LendingPoolCore receives the transferred funds and reduces the user's borrow balance accordingly; the total stable borrows (Bs) or variable borrows (Bv) in the reserve are decremented. If the full debt is repaid, the position is closed and locked collateral is released. The reserve's utilization rate drops, which lowers interest rates across the pool.

Significance

Repayment closes the feedback loop of the borrow lifecycle and is essential for maintaining pool health over time. The protocol's support for partial repayment with no fixed schedule gives borrowers maximum flexibility — they can reduce their exposure incrementally without being forced into a rigid installment plan. Accurate compounding at the moment of repayment, rather than at discrete settlement periods, ensures that neither borrower nor protocol is disadvantaged by the timing of the transaction.

Related Glossary Terms

Other Figures from Aave