Aave V3
Aave V3 是一个去中心化借贷协议。Composer 支持跨 Aave V3 市场的存款和取款操作。同链:USDC → Base 上的 Aave V3
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'
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 位小数)
},
});
| 参数 | 值 | 说明 |
|---|---|---|
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
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'
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
},
});
将
AAAVE_AUSDC_TOKEN_ADDRESS_ON_BASE 替换为您目标链上 Aave V3 市场的特定 aToken 地址。您可以在 Aave 文档 上找到 aToken 地址。HyperLend
HyperLend 是一个借贷协议。Composer 支持存款和取款操作。同链:存入 HyperLend
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'
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',
},
});
Seamless
Seamless 是一个借贷协议。Composer 支持存款和取款操作。同链:存入 Seamless
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'
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',
},
});
Maple
Maple 是一个机构借贷协议。Composer 支持存款操作(仅存款)。同链:存入 Maple
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'
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',
},
});
Maple 仅支持存款操作,无法通过 Composer 取款。
USDai
USDai 是一个收益协议。Composer 支持存款和取款操作。同链:存入 USDai
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'
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',
},
});
通用模式
所有借贷配方都遵循相同的模式:GET /quote
fromChain = 源链 ID
toChain = 目标链 ID(相同或不同)
fromToken = 您起始的代币
toToken = 借贷协议代币地址(这会触发 Composer)
fromAmount = 最小单位的金额
fromAddress = 您的钱包
toAddress = 您的钱包(接收借贷代币)
toToken 必须是支持的借贷协议的代币地址(例如 Aave 的 aToken)。
下一步
金库存款配方
Morpho、Euler、Felix 金库配方
质押配方
Lido wstETH、EtherFi、Kinetiq 质押配方
支持的协议
支持的协议和功能的完整列表
跨链模式
单个流程中的跨链 + 存款

