# Liquidity Pool Economics Documentation

## Overview

This document describes the liquidity pool economics for the trustless bridge system, including fee structure, incentives, and risk analysis.

## Current Economics

### Fee Structure

- **LP Fee**: 5 bps (0.05%) on bridge amount
- **Distribution**: Fees remain in pool (increase effective liquidity)
- **Benefit**: Proportional to LP share

### Minimum Liquidity Ratio

- **Ratio**: 110% (available / pending)
- **Enforcement**: Withdrawals blocked if below ratio
- **Purpose**: Ensure sufficient liquidity for pending claims

## Fee Calculations

### Example

**Bridge Amount**: 10 ETH
**LP Fee**: 10 ETH * 0.0005 = 0.005 ETH
**Fee Distribution**: Remains in pool, increases total liquidity

### APY Estimation

```
Daily Volume: 100 ETH
Daily Fees: 100 ETH * 0.0005 = 0.05 ETH
Annual Fees: 0.05 ETH * 365 = 18.25 ETH

Total Liquidity: 1000 ETH
APY = (18.25 / 1000) * 100 = 1.825%
```

## Risk Analysis

### Liquidity Risks

1. **Withdrawal Restrictions**:
   - Cannot withdraw if ratio < 110%
   - May need to wait for claims to finalize
   - Capital lockup risk

2. **Capital Efficiency**:
   - Capital locked in pool
   - Opportunity cost
   - Limited flexibility

3. **Pool Utilization**:
   - Low utilization = lower fees
   - High utilization = higher fees but more risk
   - Monitor utilization rates

### Mitigation

1. **Diversification**: Don't put all capital in one pool
2. **Monitoring**: Monitor pool status regularly
3. **Planning**: Plan withdrawals in advance
4. **Risk Assessment**: Continuously assess risks

## Optimization Recommendations

### Fee Structure

**Current**: 5 bps (0.05%)

**Considerations**:
- Is fee sufficient for LP incentives?
- Compare with other DeFi protocols
- Monitor LP participation

**Potential Adjustments**:
- Tiered fees based on volume
- Volume-based discounts
- Time-based incentives

### Minimum Ratio

**Current**: 110%

**Considerations**:
- Is ratio optimal for security?
- Balance security with capital efficiency
- Monitor ratio trends

**Potential Adjustments**:
- Dynamic ratio based on conditions
- Tiered ratios for different scenarios
- Emergency ratio adjustments

## Analysis Tool

Use `scripts/bridge/trustless/analyze-lp-economics.py` to analyze:
- Current pool economics
- Fee structure optimization
- APY estimates
- Risk assessment

## References

- Liquidity Pool: `contracts/bridge/trustless/LiquidityPoolETH.sol`
- Analysis Tool: `scripts/bridge/trustless/analyze-lp-economics.py`
- LP Guide: `docs/operations/LIQUIDITY_PROVIDER_GUIDE.md`

