Skip to main content

Lending Aggregation

1delta aggregates multiple DeFi lending protocols into a unified interface. Instead of integrating with each protocol separately, developers can use a single API to query data and build transactions across all supported lending markets.


The Problem

DeFi lending is fragmented across many protocols:

  • Aave (V2, V3) - The largest lending protocol
  • Compound (V2, V3) - Pioneer of algorithmic money markets
  • Morpho Blue - Permissionless lending markets
  • Silo - Isolated lending markets
  • And more...

Each protocol has:

  • Different smart contract interfaces
  • Different data structures and return formats
  • Different risk parameters and terminology
  • Different transaction patterns

Result: Building applications that work across protocols requires significant integration effort and ongoing maintenance.


The Solution

1delta provides two core capabilities:

1. Unified Data API

Query lending market data across all protocols with consistent response formats:

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

Every protocol comes back through one endpoint in one shape — supply and borrow rates, total liquidity, utilization, and risk parameters, with the same field names and units regardless of which lender produced them:

{
"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,
"totalDepositsUsd": 4033189395.3983254,
"totalLiquidityUsd": 705855814.4854279
}
]
},
"actions": null
}

Add &lender=AAVE_V3 to narrow to one protocol. Full parameter list: GET /v1/data/lending/pools.

Use cases:

  • Find the best yield across protocols
  • Compare risk parameters
  • Monitor positions across protocols
  • Build yield aggregators and dashboards

2. Transaction Building

Build lending transactions for any supported protocol through a unified interface. Switching protocols means changing the marketUid — nothing else:

# Deposit 1 WETH to Aave V3
curl "https://portal.1delta.io/v1/actions/lending/deposit\
?marketUid=AAVE_V3:1:0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\
&amount=1000000000000000000&operator=$ACCOUNT"

# The same call against Compound V3
curl "https://portal.1delta.io/v1/actions/lending/deposit\
?marketUid=COMPOUND_V3:1:0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\
&amount=1000000000000000000&operator=$ACCOUNT"

Both return the same envelope: actions.permissions (approvals to mine first) and actions.transactions (the calldata to send). Amounts are raw integers in the token's smallest unit. See the Quickstart for the full execution flow.

Supported operations:

OperationEndpoint
Deposit — supply assets to earn yield/v1/actions/lending/deposit
Withdraw — remove supplied assets/v1/actions/lending/withdraw
Borrow — take loans against collateral/v1/actions/lending/borrow
Repay — pay back borrowed assets/v1/actions/lending/repay

Composer Contract

For advanced use cases, 1delta provides the Composer contract - a smart contract that can execute complex multi-step operations atomically.

The Composer enables:

  • Batched operations - Multiple actions in one transaction
  • Flash loan integration - Borrow without collateral for atomic operations
  • Cross-protocol operations - Interact with multiple protocols atomically
  • Looping - Create leveraged positions in a single transaction

You rarely encode Composer calls yourself — the action endpoints return the encoded calldata ready to send. See the Composer entry point for the on-chain interface, and Looping for what these operations do under the hood.


Supported Protocols

185 protocol deployments across 47 chains are supported, including the Aave, Compound, Morpho, Silo, Euler, Fluid, Spark and ZeroLend families. The list changes as deployments are added, so read it from the API rather than from a table:

curl "https://portal.1delta.io/v1/data/lender-ids"

Note that a protocol usually has several deployments with distinct ids — AAVE_V3, AAVE_V3_PRIME, AAVE_V3_ETHER_FI and AAVE_V3_HORIZON are four separate markets with different rates and risk parameters. See Market identifiers.


Next Steps