APY & INTEREST
AgentLoan uses a variable 2-slope interest rate model. Rates change automatically based on pool utilization.
INTEREST RATE MODEL
If utilization ≤ 80% (kink):
BorrowAPY = 5% + (4% × utilization / 80%)
If utilization > 80%:
BorrowAPY = 9% + (145% × (util - 80%) / 20%)
SupplyAPY = BorrowAPY × utilization
| Utilization | Borrow APY | Supply APY |
|---|---|---|
| 0% | 5.0% | 0.0% |
| 40% | 7.0% | 2.8% |
| 60% | 8.0% | 4.8% |
| 80% ← kink | 9.0% | 7.2% |
| 90% | 81.5% | 73.4% |
| 100% | 154% | 154% |
Why does Supply APY stay low when utilization is low?
Supply APY = Borrow APY × utilization. If only 1% of supplied funds are borrowed, suppliers only earn 1% of the borrow interest — even if the borrow rate is high. Suppliers earn more when the pool is heavily utilized.
HOW INTEREST IS STORED (SCALED BALANCES)
AgentLoan uses the same mechanism as Aave: scaled balances with a cumulative index.
On deposit:
scaledBalance = depositAmount × RAY / liquidityIndex
Real balance (at any time):
realBalance = scaledBalance × currentLiquidityIndex / RAY
RAY = 1e27
As borrowers pay interest, liquidityIndex grows every block. Your balance grows automatically — you never need to claim rewards. When you withdraw, you receive the full real balance including all earned interest.
EXAMPLE
Deposit 1,000 xUSDC when liquidityIndex = 1.0
→ scaledBalance = 1,000
After 1 year at 5% supply APY:
liquidityIndex = 1.05
realBalance = 1,000 × 1.05 = 1,050 xUSDC
→ +50 xUSDC earned without any action