🐋 Track whale positions and liquidations on Aave V3 across Ethereum Mainnet and Sepolia.
- Multi-chain Indexing: Ethereum Mainnet + Sepolia testnet
- Whale Detection: 100 ETH threshold (~$300k+)
- Webhook Alerts: Discord/Slack integration for real-time notifications
- Events Tracked:
- 🟢 Supply (deposits)
- 🟡 Withdraw
- 🟠 Borrow
- 🔵 Repay
- 🔴 Liquidations (always alerted!)
pnpm install
envio codegen# Start PostgreSQL + Hasura
envio local docker up
# Start indexer in dev mode
envio dev# Copy environment template
cp .env.example .env
# Add your webhook URL
echo 'ALERT_WEBHOOK_URL=https://discord.com/api/webhooks/...' >> .envLocal: http://localhost:8080/v1/graphql
- GitHub account
- Project pushed to GitHub repository
- Envio account at https://envio.dev
-
Push to GitHub
git init git add . git commit -m "Initial commit: Aave Whale Liquidation Monitor" git remote add origin git@github.com:YOUR_USERNAME/aave-whale-monitor.git git push -u origin main
-
Connect to Envio
- Go to https://envio.dev/app/deployments
- Click "New Deployment"
- Connect your GitHub account
- Select your repository
-
Configure Deployment
- Envio auto-detects
config.yaml - Set environment variables:
ALERT_WEBHOOK_URL(optional)
- Click "Deploy"
- Envio auto-detects
-
Monitor Deployment
- View logs in Envio dashboard
- GraphQL endpoint provided after deployment
- Automatic sync with HyperSync (2000x faster than RPC!)
query WhalePositions {
WhalePosition(where: {isWhale: {_eq: true}}) {
id
user
reserve
totalSupplied
totalBorrowed
lastUpdated
}
}query RecentLiquidations {
LiquidationEvent(order_by: {timestamp: desc}, limit: 20) {
id
user
liquidator
debtToCover
liquidatedCollateralAmount
collateralAsset
debtAsset
isWhale
txHash
timestamp
}
}query Stats {
ProtocolStats(where: {id: {_eq: "global"}}) {
totalSupplyEvents
totalBorrowEvents
totalLiquidations
}
}Blockchain Events (Aave V3 Pool)
│
▼
HyperSync (2000x faster)
│
▼
Envio Indexer
├── EventHandlers.ts
│ ├── Track positions
│ ├── Detect whales
│ └── Send alerts
│
▼
PostgreSQL + Hasura
│
▼
GraphQL API → Your App/Dashboard
| Network | Chain ID | Aave V3 Pool Address |
|---|---|---|
| Mainnet | 1 | 0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2 |
| Sepolia | 11155111 | 0x6Ae43d3271ff6888e7Fc43Fd7321a503ff738951 |
| Event | Color | Meaning |
|---|---|---|
| 🟢 Supply | Green | Whale depositing |
| 🟡 Withdraw | Yellow | Whale withdrawing |
| 🟠 Borrow | Orange | Whale borrowing |
| 🔴 Liquidation | Red | Position liquidated |
MIT \n< Deployed via Envio HyperIndex -->