aave

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Aave V3 Yield Farming

Aave V3 收益耕作

Supply tokens into Aave V3 lending pools to earn yield, withdraw at any time, and view positions across multiple chains.
Supported Networks: Ethereum, Arbitrum, Base, Optimism, Polygon, Avalanche.
将代币存入Aave V3借贷池以赚取收益,可随时提取,并跨多条链查看持仓情况。
支持网络:Ethereum、Arbitrum、Base、Optimism、Polygon、Avalanche。

Runtime Mode

运行模式

This skill is script-only. It does not register
aave_*
tools.
Call via Python exports:
  • aave_positions(chain)
  • aave_supply(chain, token, amount)
  • aave_withdraw(chain, token, amount=0, max=False)
Imports:
from skills.aave.exports import aave_positions, aave_supply, aave_withdraw
Wallet dependency is runtime-only via
core.wallet_runtime
.
本Skill仅为脚本模式,不会注册
aave_*
工具。
通过Python导出调用:
  • aave_positions(chain)
  • aave_supply(chain, token, amount)
  • aave_withdraw(chain, token, amount=0, max=False)
导入方式:
from skills.aave.exports import aave_positions, aave_supply, aave_withdraw
钱包依赖仅在运行时通过
core.wallet_runtime
加载。

Prerequisites

前置条件

Before supply/withdraw, wallet policy must allow the transaction path.
在进行存入/提取操作前,钱包策略必须允许该交易路径。

Supported Tokens by Chain

各链支持的代币

ChainUSDCUSDTDAIWETHWBTC
Ethereumyesyesyesyesyes
Arbitrumyesyesyesyesyes
Polygonyesyesyesyesyes
Optimismyesyesyesyesyes
Avalancheyesyesyesyesyes
Baseyesyesyes
USDCUSDTDAIWETHWBTC
Ethereum
Arbitrum
Polygon
Optimism
Avalanche
Base

Script Examples

脚本示例

Read positions:
python
import asyncio
from skills.aave.exports import aave_positions

async def main():
    result = await aave_positions(chain="arbitrum")
    print(result)

asyncio.run(main())
Supply 100 USDC:
python
import asyncio
from skills.aave.exports import aave_supply

async def main():
    result = await aave_supply(chain="arbitrum", token="USDC", amount=100)
    print(result)

asyncio.run(main())
Withdraw partial / all:
python
import asyncio
from skills.aave.exports import aave_withdraw

async def main():
    part = await aave_withdraw(chain="arbitrum", token="USDC", amount=50)
    print(part)
    full = await aave_withdraw(chain="arbitrum", token="USDC", max=True)
    print(full)

asyncio.run(main())
查看持仓:
python
import asyncio
from skills.aave.exports import aave_positions

async def main():
    result = await aave_positions(chain="arbitrum")
    print(result)

asyncio.run(main())
存入100 USDC:
python
import asyncio
from skills.aave.exports import aave_supply

async def main():
    result = await aave_supply(chain="arbitrum", token="USDC", amount=100)
    print(result)

asyncio.run(main())
部分提取/全部提取:
python
import asyncio
from skills.aave.exports import aave_withdraw

async def main():
    part = await aave_withdraw(chain="arbitrum", token="USDC", amount=50)
    print(part)
    full = await aave_withdraw(chain="arbitrum", token="USDC", max=True)
    print(full)

asyncio.run(main())

Error Handling

错误处理

ErrorCauseSolution
Unknown chain
Invalid chain nameUse: ethereum, arbitrum, base, optimism, polygon, avalanche
Unknown token
Token not available on that chainCheck supported tokens table
Insufficient balance
Not enough tokens in walletCheck wallet balance before supply
Amount must be positive
Zero or negative amountUse a positive number
Policy violation
Wallet policy blocks transactionUpdate wallet policy
Not running on a Fly Machine
Local dev environmentSupply/withdraw require deployed env with wallet
错误原因解决方案
Unknown chain
链名称无效使用以下合法链名:ethereum、arbitrum、base、optimism、polygon、avalanche
Unknown token
该链不支持该代币查看支持代币表格
Insufficient balance
钱包中代币余额不足存入前检查钱包余额
Amount must be positive
金额为零或负数使用正数金额
Policy violation
钱包策略阻止交易更新钱包策略
Not running on a Fly Machine
本地开发环境存入/提取操作需要部署带有钱包的环境