Interest Rate Swap AVS (currently ecdsa based)
- Users must have active loan positions:
- Fixed Rate User: Has a fixed-rate loan on lending protocol
- Variable Rate User: Has a variable-rate loan on lending protocol
- Fixed Rate User
- Submits swap request with:
- Notional amount (e.g., 10 ETH)
- Fixed rate (e.g., 6%)
- Duration (e.g., 1 year)
- Required margin
- Loan position is verified by operators
- Variable Rate User
- Submits matching swap request with:
- Same notional amount
- Agreeable fixed rate
- Matching duration
- Required margin
- Loan position is verified by operators
- Operators validate:
- Both loans exist and are active
- Matching parameters (amount, rate, duration)
- Sufficient margins provided
- Once validated, swaps are matched
- Both parties are now in an active swap
- Monthly settlements:
- Operators monitor current variable rate
- Calculate rate differential
- Validate both loans are still active
- Execute settlement payments
- Settlement payments:
- If variable rate > fixed rate:
- Variable rate user receives difference
- If fixed rate > variable rate:
- Fixed rate user receives difference
- Swap continues until duration ends
- Final settlement is executed
- Remaining margins are returned
- Swap positions are closed
- Implement better handling when users repay underlying loans early
- Develop automated unwinding process with fair penalty structure
- Better integration with lending protocol rate feeds
