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:

// Get supply rates across all protocols for an asset
const markets = await api.getLendingMarkets({
asset: "USDC",
chainId: 1
});

// Returns normalized data from Aave, Compound, Morpho, etc.
// - Supply APY
// - Borrow APY
// - Total liquidity
// - Utilization rate
// - Risk parameters (LTV, liquidation threshold)

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:

// Deposit to any protocol
const tx = await api.buildDeposit({
protocol: "aave-v3",
asset: "WETH",
amount: "1.0",
recipient: userAddress
});

// Same interface for all protocols
const tx2 = await api.buildDeposit({
protocol: "compound-v3",
asset: "WETH",
amount: "1.0",
recipient: userAddress
});

Supported operations:

  • Deposit - Supply assets to earn yield
  • Withdraw - Remove supplied assets
  • Borrow - Take loans against collateral
  • Repay - Pay back borrowed assets

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
// Example: Deposit and borrow in one transaction
composer.deltaCompose(
depositOperation,
borrowOperation
);

See Looping for examples of complex Composer operations.


Supported Protocols

ProtocolNetworksFeatures
Aave V2Ethereum, PolygonSupply, Borrow, Flash Loans
Aave V3Ethereum, Polygon, Arbitrum, Optimism, BaseSupply, Borrow, Flash Loans, E-Mode
Compound V2EthereumSupply, Borrow
Compound V3Ethereum, Polygon, Arbitrum, BaseSupply, Borrow
Morpho BlueEthereum, BaseSupply, Borrow, Flash Loans (free)
Silo V2Ethereum, ArbitrumSupply, Borrow

Next Steps