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

# 借贷配方

> 通过 LI.FI Composer 存入 Aave V3、HyperLend、Seamless、Maple 和 USDai 借贷协议的复制粘贴配方。

通过 Composer 存入支持的借贷协议的复制粘贴配方。

<Note>
  所有配方都使用 `GET /quote` 端点。相同的 `toToken` 地址适用于 `POST /advanced/routes` 和 LI.FI SDK。完整集成指南请参见 [API 集成](/composer/guides/api-integration) 或 [SDK 集成](/composer/guides/sdk-integration)。
</Note>

***

## Aave V3

[Aave V3](https://aave.com/) 是一个去中心化借贷协议。Composer 支持跨 Aave V3 市场的存款和取款操作。

### 同链：USDC → Base 上的 Aave V3

<CodeGroup>
  ```bash curl theme={"system"}
  curl -X GET 'https://li.quest/v1/quote?fromChain=8453&toChain=8453&fromToken=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&toToken=AAVE_AUSDC_TOKEN_ADDRESS_ON_BASE&fromAddress=0xYOUR_WALLET_ADDRESS&toAddress=0xYOUR_WALLET_ADDRESS&fromAmount=1000000'
  ```

  ```ts TypeScript theme={"system"}
  const quote = await axios.get('https://li.quest/v1/quote', {
    params: {
      fromChain: 8453,                                              // Base
      toChain: 8453,                                                // Base (同链)
      fromToken: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',     // Base 上的 USDC
      toToken: 'AAAVE_AUSDC_TOKEN_ADDRESS_ON_BASE',                 // Base 上的 Aave aUSDC
      fromAddress: '0xYOUR_WALLET_ADDRESS',
      toAddress: '0xYOUR_WALLET_ADDRESS',
      fromAmount: '1000000',                                        // 1 USDC (6 位小数)
    },
  });
  ```
</CodeGroup>

| 参数           | 值                                            | 说明                 |
| ------------ | -------------------------------------------- | ------------------ |
| `fromChain`  | `8453`                                       | Base               |
| `toChain`    | `8453`                                       | Base (同链)          |
| `fromToken`  | `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` | Base 上的 USDC       |
| `toToken`    | `AAAVE_AUSDC_TOKEN_ADDRESS_ON_BASE`          | Base 上的 Aave aUSDC |
| `fromAmount` | `1000000`                                    | 1 USDC (6 位小数)     |

### 跨链：Ethereum 上的 ETH → Arbitrum 上的 Aave V3

<CodeGroup>
  ```bash curl theme={"system"}
  curl -X GET 'https://li.quest/v1/quote?fromChain=1&toChain=42161&fromToken=0x0000000000000000000000000000000000000000&toToken=AAAVE_AUSDC_TOKEN_ADDRESS_ON_ARBITRUM&fromAddress=0xYOUR_WALLET_ADDRESS&toAddress=0xYOUR_WALLET_ADDRESS&fromAmount=100000000000000000'
  ```

  ```ts TypeScript theme={"system"}
  const quote = await axios.get('https://li.quest/v1/quote', {
    params: {
      fromChain: 1,                                                 // Ethereum
      toChain: 42161,                                                // Arbitrum
      fromToken: '0x0000000000000000000000000000000000000000',       // ETH (原生)
      toToken: 'AAAVE_AUSDC_TOKEN_ADDRESS_ON_ARBITRUM',             // Arbitrum 上的 Aave aUSDC
      fromAddress: '0xYOUR_WALLET_ADDRESS',
      toAddress: '0xYOUR_WALLET_ADDRESS',
      fromAmount: '100000000000000000',                             // 0.1 ETH
    },
  });
  ```
</CodeGroup>

<Tip>
  将 `AAAVE_AUSDC_TOKEN_ADDRESS_ON_BASE` 替换为您目标链上 Aave V3 市场的特定 aToken 地址。您可以在 [Aave 文档](https://docs.aave.com/developers/deployed-contracts) 上找到 aToken 地址。
</Tip>

***

## HyperLend

[HyperLend](https://hyperlend.finance/) 是一个借贷协议。Composer 支持存款和取款操作。

### 同链：存入 HyperLend

<CodeGroup>
  ```bash curl theme={"system"}
  curl -X GET 'https://li.quest/v1/quote?fromChain=CHAIN_ID&toChain=CHAIN_ID&fromToken=SOURCE_TOKEN_ADDRESS&toToken=HYPERLEND_TOKEN_ADDRESS&fromAddress=0xYOUR_WALLET_ADDRESS&toAddress=0xYOUR_WALLET_ADDRESS&fromAmount=AMOUNT_IN_SMALLEST_UNIT'
  ```

  ```ts TypeScript theme={"system"}
  const quote = await axios.get('https://li.quest/v1/quote', {
    params: {
      fromChain: CHAIN_ID,
      toChain: CHAIN_ID,
      fromToken: 'SOURCE_TOKEN_ADDRESS',
      toToken: 'HYPERLEND_TOKEN_ADDRESS',                            // HyperLend 代币地址
      fromAddress: '0xYOUR_WALLET_ADDRESS',
      toAddress: '0xYOUR_WALLET_ADDRESS',
      fromAmount: 'AMOUNT_IN_SMALLEST_UNIT',
    },
  });
  ```
</CodeGroup>

***

## Seamless

[Seamless](https://seamlessprotocol.com/) 是一个借贷协议。Composer 支持存款和取款操作。

### 同链：存入 Seamless

<CodeGroup>
  ```bash curl theme={"system"}
  curl -X GET 'https://li.quest/v1/quote?fromChain=CHAIN_ID&toChain=CHAIN_ID&fromToken=SOURCE_TOKEN_ADDRESS&toToken=SEAMLESS_TOKEN_ADDRESS&fromAddress=0xYOUR_WALLET_ADDRESS&toAddress=0xYOUR_WALLET_ADDRESS&fromAmount=AMOUNT_IN_SMALLEST_UNIT'
  ```

  ```ts TypeScript theme={"system"}
  const quote = await axios.get('https://li.quest/v1/quote', {
    params: {
      fromChain: CHAIN_ID,
      toChain: CHAIN_ID,
      fromToken: 'SOURCE_TOKEN_ADDRESS',
      toToken: 'SEAMLESS_TOKEN_ADDRESS',                             // Seamless 代币地址
      fromAddress: '0xYOUR_WALLET_ADDRESS',
      toAddress: '0xYOUR_WALLET_ADDRESS',
      fromAmount: 'AMOUNT_IN_SMALLEST_UNIT',
    },
  });
  ```
</CodeGroup>

***

## Maple

[Maple](https://maple.finance/) 是一个机构借贷协议。Composer 支持存款操作（仅存款）。

### 同链：存入 Maple

<CodeGroup>
  ```bash curl theme={"system"}
  curl -X GET 'https://li.quest/v1/quote?fromChain=CHAIN_ID&toChain=CHAIN_ID&fromToken=SOURCE_TOKEN_ADDRESS&toToken=MAPLE_TOKEN_ADDRESS&fromAddress=0xYOUR_WALLET_ADDRESS&toAddress=0xYOUR_WALLET_ADDRESS&fromAmount=AMOUNT_IN_SMALLEST_UNIT'
  ```

  ```ts TypeScript theme={"system"}
  const quote = await axios.get('https://li.quest/v1/quote', {
    params: {
      fromChain: CHAIN_ID,
      toChain: CHAIN_ID,
      fromToken: 'SOURCE_TOKEN_ADDRESS',
      toToken: 'MAPLE_TOKEN_ADDRESS',                                // Maple 代币地址
      fromAddress: '0xYOUR_WALLET_ADDRESS',
      toAddress: '0xYOUR_WALLET_ADDRESS',
      fromAmount: 'AMOUNT_IN_SMALLEST_UNIT',
    },
  });
  ```
</CodeGroup>

<Note>
  Maple 仅支持存款操作，无法通过 Composer 取款。
</Note>

***

## USDai

[USDai](https://usd.ai/) 是一个收益协议。Composer 支持存款和取款操作。

### 同链：存入 USDai

<CodeGroup>
  ```bash curl theme={"system"}
  curl -X GET 'https://li.quest/v1/quote?fromChain=CHAIN_ID&toChain=CHAIN_ID&fromToken=SOURCE_TOKEN_ADDRESS&toToken=USDAI_TOKEN_ADDRESS&fromAddress=0xYOUR_WALLET_ADDRESS&toAddress=0xYOUR_WALLET_ADDRESS&fromAmount=AMOUNT_IN_SMALLEST_UNIT'
  ```

  ```ts TypeScript theme={"system"}
  const quote = await axios.get('https://li.quest/v1/quote', {
    params: {
      fromChain: CHAIN_ID,
      toChain: CHAIN_ID,
      fromToken: 'SOURCE_TOKEN_ADDRESS',
      toToken: 'USDAI_TOKEN_ADDRESS',                                // USDai 代币地址
      fromAddress: '0xYOUR_WALLET_ADDRESS',
      toAddress: '0xYOUR_WALLET_ADDRESS',
      fromAmount: 'AMOUNT_IN_SMALLEST_UNIT',
    },
  });
  ```
</CodeGroup>

***

## 通用模式

所有借贷配方都遵循相同的模式：

```
GET /quote
  fromChain  = 源链 ID
  toChain    = 目标链 ID（相同或不同）
  fromToken  = 您起始的代币
  toToken    = 借贷协议代币地址（这会触发 Composer）
  fromAmount = 最小单位的金额
  fromAddress = 您的钱包
  toAddress   = 您的钱包（接收借贷代币）
```

**唯一的 Composer 特定细节**是 `toToken` 必须是支持的借贷协议的代币地址（例如 Aave 的 aToken）。

***

## 下一步

<CardGroup cols={2}>
  <Card title="金库存款配方" icon="vault" href="/composer/recipes/vault-deposits">
    Morpho、Euler、Felix 金库配方
  </Card>

  <Card title="质押配方" icon="coins" href="/composer/recipes/staking">
    Lido wstETH、EtherFi、Kinetiq 质押配方
  </Card>

  <Card title="支持的协议" icon="list" href="/composer/reference/supported-protocols">
    支持的协议和功能的完整列表
  </Card>

  <Card title="跨链模式" icon="bridge" href="/composer/guides/cross-chain-compose">
    单个流程中的跨链 + 存款
  </Card>
</CardGroup>
