Yo guys, recently I've started a LP on Arb chain to farm fees for both LEO/USDC pairing. And the results has been really great ! However I wanted to optimize my earnings on the LPs that I'm on and decided to get claude AI to help me with it.
The results !!
What it does is that the both will periodically check your wallet for the LP (in this case LEO/USDC) pairs which is in Uniswap using the v4 pools and then see if its in range, or how its performing. It would then provide a Utilization score or let you know if you are currently out of range.
You'd be surprise on the APR at the moment as it went as high as 339%
Prompts prompts prompts
Here is a prompt which I've generated to share with you all in the event you wanna try it out and I'm sure you can make something better. For me .. its just one of those little projects which makes it easier for me to monitor all my LPs.
🤖 QUICK SHARE: Recreate My LP Management Bot
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 COPY-PASTE THIS PROMPT TO CLAUDE/CHATGPT:
────────────────────────────────────────────────
Build me a production-ready Uniswap V3/V4 LP management bot for Arbitrum with these features:
CORE FEATURES:
- Pool Discovery - Find pools across DEXs and fee tiers
- Analytics Dashboard - Real-time APR, TVL, volume, IL simulations with beautiful CLI tables
- Auto-Compounder - Collect fees, rebalance 50/50, reinvest (with dry-run mode)
- Monitoring Bot - 24/7 health tracking with alerts (HEALTHY/WARNING/URGENT)
- Rebalancing Planner - Generate profitable rebalancing plans
TECH STACK:
- TypeScript 5.3+ with ethers.js 6.10
- CLI tools with chalk and cli-table3
- Uniswap V3 & V4 support
- TheGraph integration for historical data
PROJECT STRUCTURE:
src/
├── config/ (network.ts, tokens.ts)
├── utils/ (poolData, positionManager, calculateAPR, simulateIL, rangeAnalyzer)
├── bot/ (monitor, monitoringService, transactionBuilder)
└── CLI tools (findPool, analyzePool, autoCompound)
SAFETY FEATURES:
- Dry-run mode for all operations
- Slippage protection & gas estimation
- Minimum thresholds for actions
- Comprehensive error handling
- Transaction logging with hashes
- Environment variables for secrets
CLI COMMANDS:
npm run find-pool # Find pools
npm run analyze # View analytics
npm run compound --dry-run # Test compounding
npm run bot:monitor # Start monitoring
npm run bot:plan # Generate rebalancing plans
CONFIGURATION:
- bot.config.json for monitoring intervals, thresholds, alerts
- .env for RPC_URL and PRIVATE_KEY
- Support any token pair (default LEO/USDC)
LEO: {
address: '0x93864d81175095DD93360FFA2A529b8642F76A6E',
decimals: 3, // Important: LEO uses 3 decimals!
symbol: 'LEO'}
USDC: {
address: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831',
decimals: 6,
symbol: 'USDC'}
KEY CALCULATIONS:
- APR = (fees / TVL) × (365 / period) × 100
- IL = 2√(price_ratio) / (1 + price_ratio) - 1
- Break-even = days to offset IL with fees
- Utilization = position efficiency vs full range
MONITORING ALERTS:
- Out of range detection
- Low utilization warnings (<50%)
- Near edge warnings (<20% to boundary)
- Profitability analysis before actions
REBALANCING PLANS:
- Current vs recommended range analysis
- Expected improvement calculations
- Gas cost vs benefit comparison
- Step-by-step instructions
- Save to JSON/TXT files
Include comprehensive error handling, beautiful CLI output with colors and tables, detailed logging, and complete documentation (README, QUICK_START, troubleshooting).
Make it production-ready, secure, and user-friendly. Support both testnet and mainnet.
────────────────────────────────────────────────
⏱️ TIME TO BUILD: 30-60 minutes with AI
📦 WHAT YOU NEED:
- Node.js 20+
- Arbitrum wallet with LP position
- RPC endpoint (free public RPC works)
- Private key (keep secret!)
🚀 QUICK START AFTER BUILD:
- npm install
- Copy .env.example to .env, add your keys
- npm run build
- npm run analyze
- npm run compound --dry-run
- npm run bot:monitor
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💡 PRO TIP: Start with "npm run analyze" to understand your position,
then use "npm run bot:once" to check health before setting up continuous monitoring.
⚠️ ALWAYS test with --dry-run first!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Posted Using INLEO