mcpField
A
aave

aave

github.com/starchild-ai-agent其他30322 次安装6 天前更新
代码仓库

关于 aave

aave 是通过脚本在 Aave V3 借贷池中存入和提取代币、查看持仓的技能,面向管理链上借贷仓位的用户。它支持六个网络,并以 Python exports 函数运行,而不注册专用工具。

主要功能

  1. 01查看 Aave V3 持仓
  2. 02向借贷池存入代币
  3. 03提取部分或全部代币
  4. 04支持六个网络及指定代币
  5. 05通过 Python exports 函数调用

适用场景

  1. 01查询不同网络上的持仓
  2. 02向 Aave V3 存入支持的代币
  3. 03提取部分资金或全部余额

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/starchild-ai-agent/official-skills --skill aave

安装后在 Claude Code 中输入/aave确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

_trade_report.py
aave.py
exports.py

详细介绍

Aave V3 收益耕作

将代币存入 Aave V3 借贷池以赚取收益,可随时提取,并查看多个链上的持仓。

支持的网络:Ethereum、Arbitrum、Base、Optimism、Polygon、Avalanche。

运行模式

此技能仅包含脚本,不会注册 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 提供。

前置条件

进行存入或提取前,钱包策略必须允许相应的交易路径。

各链支持的代币

链USDCUSDTDAIWETHWBTC
Ethereum是是是是是
Arbitrum是是是是是
Polygon是是是是是
Optimism是是是是是
Avalanche是是是是是
Base是—是是—

脚本示例

读取持仓:

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:

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())

部分提取 / 全部提取:

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())

错误处理

错误原因解决方案
Unknown chain链名称无效使用:ethereum、arbitrum、base、optimism、polygon、avalanche
Unknown token该链不支持此代币查看支持的代币表
Insufficient balance钱包中的代币余额不足存入前检查钱包余额
Amount must be positive金额为零或负数使用正数
Policy violation钱包策略阻止交易更新钱包策略
Not running on a Fly Machine本地开发环境存入 / 提取需要在已部署且配置了钱包的环境中进行

评论

支持 Markdown