48 lines
1.4 KiB
Markdown
48 lines
1.4 KiB
Markdown
|
|
# Compound/Aave Integration for Yield Generation
|
||
|
|
|
||
|
|
## Overview
|
||
|
|
|
||
|
|
While Compound and Aave are not swap protocols, they can be integrated for yield generation on idle liquidity, improving capital efficiency.
|
||
|
|
|
||
|
|
## Use Case
|
||
|
|
|
||
|
|
When bridge liquidity is not immediately needed:
|
||
|
|
1. Deposit idle funds to Compound/Aave
|
||
|
|
2. Earn interest on deposits
|
||
|
|
3. Withdraw when needed for bridge operations
|
||
|
|
|
||
|
|
## Implementation Approach
|
||
|
|
|
||
|
|
### Option 1: Separate Yield Module
|
||
|
|
|
||
|
|
Create a `YieldManager` contract that:
|
||
|
|
- Monitors liquidity pool utilization
|
||
|
|
- Deposits excess liquidity to Compound/Aave
|
||
|
|
- Withdraws when liquidity is needed
|
||
|
|
- Maintains minimum liquidity threshold
|
||
|
|
|
||
|
|
### Option 2: Integration with LiquidityPoolETH
|
||
|
|
|
||
|
|
Extend `LiquidityPoolETH` to:
|
||
|
|
- Automatically deposit excess funds
|
||
|
|
- Track yield earned
|
||
|
|
- Distribute yield to LPs
|
||
|
|
|
||
|
|
## Benefits
|
||
|
|
|
||
|
|
1. **Capital Efficiency**: Earn yield on idle funds
|
||
|
|
2. **LP Returns**: Higher returns for liquidity providers
|
||
|
|
3. **Automated**: No manual intervention needed
|
||
|
|
|
||
|
|
## Considerations
|
||
|
|
|
||
|
|
1. **Withdrawal Delays**: Compound/Aave may have withdrawal delays
|
||
|
|
2. **Minimum Thresholds**: Must maintain minimum liquidity for bridge operations
|
||
|
|
3. **Gas Costs**: Additional gas for deposit/withdraw operations
|
||
|
|
4. **Risk**: Smart contract risk from Compound/Aave
|
||
|
|
|
||
|
|
## Recommendation
|
||
|
|
|
||
|
|
Implement as a separate module that can be enabled/disabled via admin controls. This keeps the core bridge logic simple while adding optional yield generation.
|
||
|
|
|