Fig. 10 Aave Aave

Faiz Oranı Değiştirme Mekanizması

Toggle between stable and variable interest rates
Toggle between stable and variable interest rates

Context

This figure appears in Section 3.5 'Swap Rate' and shows the workflow for a borrower to switch between stable and variable interest rate modes on an existing open borrow position. It is a unique feature of Aave not present in most DeFi lending protocols. The diagram captures the validation and state update sequence involved in the rate swap.

What This Figure Shows

The Rate Swap workflow allows a user with an active borrow to call swapBorrowRateMode() to toggle between stable rate (Rs) and variable rate (Rv) pricing. When switching from variable to stable, the contract first checks that the user is eligible to take a stable rate position (subject to the limitations described in Section 4.3, such as not having deposited more as collateral than they are borrowing). It then settles all accrued interest under the previous rate mode by updating the user's compounded balance, closes the old position type, and opens a new position at the current stable or variable rate. The reserve's accounting is updated: total stable borrows (Bs) and total variable borrows (Bv) are adjusted accordingly, and the average stable rate (Rsa) is recalculated. The overall utilization and borrow rates update to reflect the changed composition.

Significance

The ability to swap between stable and variable rates gives borrowers a risk management tool that mirrors features available in traditional finance, such as fixed-to-floating rate swaps. This feature is significant because it lets users adapt their cost of capital to changing market conditions without closing and reopening a position — which would be costly in gas fees and could alter their collateral exposure. It also keeps the protocol's stable rate pool dynamic and properly sized.

Related Glossary Terms

Other Figures from Aave