首页>
AI教程>
Aave:DeFi 借贷智能体 - Openclaw Skills
Aave:DeFi 借贷智能体 - Openclaw Skills
时间:2026-03-27 20:51:01
作者:互联网
什么是 Aave?
此技能将 Aave 协议集成到您的 AI 智能体工作流中,实现去中心化金融头寸的无缝管理。它为资产供应以赚取利息、抵押借代以及坚控健康因子(Health Factor)等关键指标提供技术指导和操作支持,以防止清算。
通过利用适用于 Aave 的 Openclaw Skills,用户可以与 Ethereum、Polygon、Arbitrum 和其他支持链上的 V3 市场进行交互。该技能简化了 E-Mode(效率模式)和 GHO 稳定币铸造等复杂的 DeFi 概念,通过自动化智能体交互使高级财务策略更易于实现。
下载入口:https://github.com/openclaw/skills/tree/main/skills/ivangdavila/aave
安装与下载
1. ClawHub CLI
从源直接安装技能的最快方式。
npx clawhub@latest install aave
2. 手动安装
将技能文件夹复制到以下位置之一
全局模式
~/.openclaw/skills/
工作区
/skills/
优先级:工作区 > 本地 > 内置
3. 提示词安装
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 aave。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
Aave 应用场景
- 自动化资产供应,从闲置的加密资产中赚取实时利息。
- 实时坚控健康因子,在市场波动期间触发告警或防御动作。
- 为稳定币等相关资产使用 E-Mode 执行高效的借代策略。
- 管理跨 Arbitrum、Optimism 和 Avalanche 的多链债务头寸。
- 在安全模块(Safety Module)中质押 AAVE 代币以获得治理权和奖励。
Aave 工作原理
- 智能体分析用户的当前浅包余额和协议权限,以识别符合供应条件的资产。
- 供应资产后,协议会发行代表计息头寸的 aToken(例如 aUSDC)。
- 智能体根据所提供抵押品的带宽价值比(LTV)计算可用借代额度。
- 发起借代后,智能体持续坚控健康因子;如果该值接近 1.0,智能体将建议增加抵押品或偿还债务。
- 利息会自动累计到 aToken 余额或债务头寸中,通过 Openclaw Skills 框架进行管理。
Aave 配置指南
要在您的 AI 智能体环境中启用 Aave 技能,请确保已安装核心组件并为目标区块链配置了有效的提供商。
# 安装 Openclaw Skills Aave 核心组件
npm install @openclaw/skills-aave
# 为 web3 访问配置环境变量
export RPC_URL="your_provider_url"
export PRIVATE_KEY="your_wallet_key"
请遵循特定链的文档以确保与 Aave V3 部署的兼容性,并确保您的浅包有足够的 Gas 用于交易审批。
Aave 数据架构与分类体系
该技能使用结构化元数据方法组织 DeFi 数据,以跟踪头寸和风险级别。
| 字段 |
描述 |
类型 |
| healthFactor |
表示清算风险的数值 |
浮点数 |
| totalCollateral |
以 ETH/USD 计的供应资产总价值 |
小数 |
| totalDebt |
借入资产的总价值 |
小数 |
| availableBorrows |
剩余借代能力 |
小数 |
| currentLtv |
当前带宽价值比 |
百分比 |
name: Aave
description: Assist with Aave lending, borrowing, liquidations, and risk management across chains.
metadata: {"clawdbot":{"emoji":"??","os":["linux","darwin","win32"]}}
Core Concepts
- Supply assets to earn interest — deposit, receive aTokens representing position
- Borrow against collateral — must supply first, then borrow up to limit
- aTokens accrue interest — balance grows over time automatically
- Health Factor determines liquidation risk — below 1.0 = liquidation
- Variable and stable rates available — stable costs more but predictable
Health Factor (Critical)
- Health Factor = (Collateral × Liquidation Threshold) / Borrowed
- Above 1.0 is safe — higher is safer
- At 1.0, liquidation begins — partial position closed
- Monitor actively during volatility — prices move, health factor changes
- Add collateral or repay debt to improve — before liquidation happens
Supplying (Lending)
- Deposit supported assets — ETH, stablecoins, various tokens
- Receive aTokens 1:1 — aETH, aUSDC, etc.
- Interest accrues in real-time — aToken balance grows
- Can withdraw anytime if liquidity available — high utilization may block withdrawals
- Enable as collateral to borrow against — optional per asset
Borrowing
- Must have collateral supplied first — can't borrow without
- Borrow up to LTV (Loan-to-Value) ratio — varies by asset, usually 70-85%
- Interest accrues on borrowed amount — must repay more than borrowed
- Variable rate changes with market — stable rate fixed but higher
- Debt tokens represent borrowing — not transferable
Liquidations
- Triggered when Health Factor < 1 — automated, permissionless
- Liquidators repay portion of debt — receive collateral + bonus
- Liquidation penalty 5-10% — you lose this bonus amount
- Up to 50% of debt liquidated at once — may need multiple liquidations
- Prevention: monitor and manage HF actively
Multi-Chain Deployment
- Aave V3 on Ethereum, Polygon, Arbitrum, Optimism, Avalanche, more
- Same interface, different markets — assets and rates differ
- Bridged assets may differ — USDC vs USDC.e
- Portals enable cross-chain — supply on one chain, borrow on another
E-Mode (Efficiency Mode)
- Higher LTV for correlated assets — stablecoins to stablecoins, ETH to stETH
- Up to 97% LTV in E-Mode — vs ~80% normally
- Only borrow assets in same E-Mode category — restricted but efficient
- Higher liquidation risk — narrow margin, monitor closely
GHO Stablecoin
- Aave's native stablecoin — minted by borrowing
- Backed by Aave collateral — overcollateralized
- Interest paid to Aave DAO — different from regular borrowing
- stkAAVE holders get discount — reduced borrow rate
AAVE Token
- Governance token — vote on proposals
- Staking in Safety Module — earn rewards, risk of slashing in shortfall
- stkAAVE for staking — represents staked position
- 10-day cooldown to unstake — plus 2-day unstake window
Risk Management
- Don't max out borrowing — leave buffer for price movements
- Diversify collateral — single asset concentration increases risk
- Use stablecoins for lower volatility — stable collateral = stable HF
- Set alerts for Health Factor — services like DefiSaver
- Consider automation — automatic deleveraging tools
Common Mistakes
- Borrowing at max LTV — immediate liquidation risk
- Ignoring variable rate changes — rates can spike quickly
- Not monitoring during volatility — HF changes fast with price
- Supplying without enabling collateral — can't borrow if not enabled
- Forgetting about interest — debt grows over time
Gas Considerations
- Approvals needed for each new asset — first-time gas cost
- Supply and borrow are separate transactions — plan gas for both
- L2 deployments much cheaper — Arbitrum, Optimism save significantly
- Batch operations where possible — some aggregators help
Integrations
- DefiSaver for automation — auto-repay, auto-leverage
- Instadapp for advanced management — DeFi dashboard
- 1inch, Paraswap for swaps — swap and supply in one transaction
- Flash loans for advanced users — borrow without collateral, repay in same tx