> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usmewe.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Insurance Pool

> How the protocol protects stakers from defaults

# Insurance Pool

The Insurance Pool is a separate reserve that protects Trust Vault stakers from borrower defaults.

## How It Works

```
Every Transaction
      │
      ▼
┌─────────────────┐
│  10% Fee        │──────► Insurance Pool
└─────────────────┘
      │
      ▼
┌─────────────────┐
│  90% to Vault   │──────► Staker Yield
└─────────────────┘
```

<Note>
  10% of all interest payments are automatically routed to the Insurance Pool.
</Note>

## Default Coverage

When a borrower defaults (>7 days late):

| Coverage            | Amount           |
| ------------------- | ---------------- |
| Insurance Pool pays | 80% of principal |
| Staker loss         | 20% of principal |
| Borrower penalty    | -30% Trust Score |

### Example

```typescript theme={null}
// Borrower defaults on $100 loan
const defaultedAmount = 100;

const insuranceCoverage = defaultedAmount * 0.80; // $80
const stakerLoss = defaultedAmount * 0.20;        // $20

// Insurance Pool pays $80 to cover the default
// Stakers collectively absorb $20 loss
```

## Pool Mechanics

### Funding

The Insurance Pool grows through:

1. **Transaction fees** - 10% of all interest
2. **Default penalties** - Late fees from delinquent borrowers
3. **Protocol revenue** - Portion of service fees

### Payouts

Payouts occur automatically when:

1. Loan is marked as defaulted (>7 days overdue)
2. Oracle confirms default status
3. Smart contract triggers Insurance Pool payout

### Surplus Distribution

When the Insurance Pool exceeds target reserves:

<Steps>
  <Step title="Calculate Surplus">
    Surplus = Pool Balance - (Total Outstanding Loans × 0.15)
  </Step>

  <Step title="Distribute to Contributors">
    Surplus is distributed proportionally to historical contributors
  </Step>

  <Step title="Governance Vote">
    Large distributions require governance approval
  </Step>
</Steps>

## Pool Statistics

| Metric              | Value        |
| ------------------- | ------------ |
| Current Balance     | \$XXX,XXX    |
| Coverage Ratio      | XX%          |
| Historical Defaults | X            |
| Total Payouts       | \$X,XXX      |
| Target Reserve      | 15% of loans |

## Risk Factors

<Warning>
  The Insurance Pool cannot cover all defaults in extreme scenarios.
</Warning>

| Scenario                 | Coverage                  |
| ------------------------ | ------------------------- |
| Normal operations        | 100% of 80% coverage      |
| High default rate (>10%) | Partial coverage possible |
| Pool exhaustion          | Stakers bear full loss    |

### Mitigations

1. **Conservative lending** - Trust Score limits exposure
2. **Diversification** - Many small loans vs few large ones
3. **Reserve targets** - Pool maintains 15%+ of outstanding loans
4. **Governance controls** - Can pause lending if needed

## Smart Contract

The Insurance Pool is managed by a dedicated smart contract:

```solidity theme={null}
// InsurancePool.sol (simplified)
contract InsurancePool {
    uint256 public poolBalance;
    uint256 public targetReserveRatio = 15; // 15%

    function coverDefault(address borrower, uint256 amount) external onlyVault {
        uint256 coverage = (amount * 80) / 100;
        require(poolBalance >= coverage, "Insufficient pool balance");

        poolBalance -= coverage;
        emit DefaultCovered(borrower, amount, coverage);
    }
}
```

<Card title="View Contract" icon="file-contract" href="/smart-contracts/insurance-pool">
  Full Insurance Pool contract documentation
</Card>
