# What is 1delta

> The ultimate lending aggregation API suite. One API for all DeFi lending protocols.

Source: https://docs.1delta.io/

---

## Why Lending Aggregation Matters

DeFi lending has grown to billions in TVL across dozens of protocols. But this fragmentation creates real problems for users and developers.

---

## The Current State: Fragmented Lending

Today's DeFi lending ecosystem looks like this:

### The Confusion Problem

Consider a user wanting to supply USDC for yield. They face:

| Protocol | Supply APY | Risk Factors |
|----------|-----------|--------------|
| Aave V3 | 5.2% | Battle-tested, insurance fund |
| Compound V3 | 4.8% | Single-collateral model, proven security |
| Morpho Blue | 6.1% | Higher rates, market-specific risk |
| Silo V2 | 5.5% | Isolated markets, newer protocol |

**Questions the user must answer:**

1. Which APY is actually best after accounting for gas costs?
2. How do the risk parameters compare?
3. What's my liquidation threshold on each?
4. How liquid is each market if I need to exit quickly?
5. Do I need to monitor multiple positions?

**For developers, it's even worse:**

- 5 different APIs to integrate
- 5 different data formats
- 5 different transaction formats
- 5 different risk models to understand
- Constant maintenance as protocols upgrade

---

## The 1delta Solution: Unified Aggregation

---

## Real-World Scenario: Finding the Best USDC Yield

### Without 1delta (Manual Approach)

**Step 1: Check Aave V3**
- Navigate to app.aave.com → Connect wallet → Find USDC market
- Note: 5.2% APY, 82.5% LTV | Gas to deposit: ~$15

**Step 2: Check Compound V3**
- Navigate to compound.finance → Connect wallet → Find USDC market
- Note: 4.8% APY, 90% LTV | Gas to deposit: ~$12

**Step 3: Check Morpho Blue**
- Navigate to morpho.org → Connect wallet → Find USDC markets (multiple!)
- Compare rates across markets
- Note: 5.5-6.5% APY depending on market | Gas to deposit: ~$18

**Step 4: Make decision**
- Compare rates → Evaluate risks manually → Execute transaction

[The Manual Process]
| | |
|---|---|
| **Time** | 30+ minutes |
| **Mental overhead** | High |
| **Missed opportunity** | Better rate launched on Silo while you were checking |

### With 1delta API

One request returns every market for the asset, across every protocol, in one
shape:

```bash
curl "https://portal.1delta.io/v1/data/lending/pools?chainId=1"
```

```json
{
  "success": true,
  "data": {
    "items": [
      {
        "marketUid": "AAVE_V3:1:0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
        "lenderKey": "AAVE_V3",
        "name": "Aave V3 WETH",
        "depositRate": 1.41624773,
        "variableBorrowRate": 2.0744452,
        "utilization": 0.8005563978698457,
        "totalLiquidityUsd": 705855814.4854279
      }
    ]
  },
  "actions": null
}
```

Sort by `depositRate`, then hand the winning `marketUid` straight to an action
endpoint to get signable calldata back:

```bash
curl "https://portal.1delta.io/v1/actions/lending/deposit\
?marketUid=AAVE_V3:1:0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\
&amount=1000000000000000000\
&operator=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
```

```json
{
  "success": true,
  "actions": {
    "transactions": [
      { "to": "0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2", "data": "0x617ba037…", "value": "0" }
    ],
    "permissions": [
      { "to": "0xc02aaa39…", "data": "0x095ea7b3…", "value": "0", "description": "Approve for AAVE_V3" }
    ]
  }
}
```

Send the approval, then the transaction. Full walkthrough in the
[Quickstart](https://docs.1delta.io/quickstart/).

[Result]

| | |
|---|---|
| **Time** | 30 seconds |
| **Mental overhead** | Minimal |
| **Always optimal** | Yes |

---

## Quantified Benefits

### For Users

| Metric | Manual | With 1delta | Improvement |
|--------|--------|-------------|-------------|
| Time to find best rate | 30+ min | Instant | 99%+ |
| Transactions for looping | 5-10 | 1 | 80-90% |
| Missed yield opportunities | Common | None | 100% |
| Risk of partial execution | Yes | No | Eliminated |

### For Developers

| Aspect | Direct Integration | 1delta API | Benefit |
|--------|-------------------|------------|---------|
| Protocols to integrate | 5+ | 1 | 80% less code |
| APIs to maintain | 5+ | 1 | 80% less maintenance |
| Data formats | 5+ different | 1 unified | Simplified logic |
| Transaction builders | 5+ | 1 | Faster development |
| Time to market | Months | Days | 10x faster |

---

## Risk Aggregation: Comparing Apples to Apples

One of the biggest challenges in DeFi lending is comparing risk across protocols. Each protocol uses different terminology and metrics.

### The Problem: Inconsistent Risk Metrics

| Protocol | Collateral Term | Liquidation Term | Penalty Term |
|----------|----------------|------------------|--------------|
| Aave | LTV | Liquidation Threshold | Liquidation Bonus |
| Compound | Collateral Factor | Liquidate Borrow | Close Factor |
| Morpho | LLTV | LLTV | Liquidation Incentive |

**Same concepts, different names, different calculations.**

### The Solution: Normalized Risk Metrics

1delta normalizes all risk parameters into a consistent format:

Every lender's markets come back through the same endpoint, with the same field
names and the same units — so comparing Aave against Compound against Morpho is
sorting an array, not writing three adapters:

```bash
curl "https://portal.1delta.io/v1/data/lending/pools?chainId=1"
```

Each item carries its own `marketUid`, its rates as percentages, and its
utilization and risk parameters as fractions between 0 and 1. Field-by-field
detail is in the
[endpoint reference](https://docs.1delta.io/1delta-api/get-lending-pools/) and in
[`llms-full.txt`](https://docs.1delta.io/llms-full.txt).

---

## Protocol Migration Made Easy

**Scenario:** User has a 3x leveraged wstETH position on Aave V3 but Compound V3 just launched better rates.

### Manual Migration (Without 1delta)

1. Obtain funds to repay debt (where from?)
2. Repay debt on Aave
3. Withdraw collateral from Aave
4. Deposit collateral to Compound
5. Borrow from Compound
6. Return borrowed funds

[Manual Migration Cost]

| | |
|---|---|
| **Transactions** | 6+ |
| **Risk** | Price movement between steps could cause issues |
| **Time** | 30+ minutes |
| **Complexity** | High (need temporary capital) |

### 1delta Migration (Single Transaction)

With our stack, such an operation can be executed in a single transaction without any currency conversions.

[1delta Migration Result]

| | |
|---|---|
| **Transactions** | 1 (atomic) |
| **Risk** | None (atomic execution, no swaps needed) |
| **Time** | Single block |
| **Complexity** | Handled by 1delta |

---

## Summary: The Aggregation Advantage

**Key Benefits:**

1. **Single integration point** - One API for all protocols
2. **Normalized data** - Consistent formats and risk metrics
3. **Optimal rates** - Always find the best opportunity
4. **Atomic execution** - No partial execution risk
5. **Gas efficiency** - Complex operations in single transactions
6. **Future-proof** - New protocols added without code changes

---

## Get Started

Ready to simplify your DeFi lending integration?

[Integrating with an AI coding assistant?]
Point it at [`llms-full.txt`](https://docs.1delta.io/llms-full.txt) — every
endpoint, parameter and example as plain text. The interactive endpoint pages
render their schemas in the browser, so fetching their HTML shows prose only.
