Automated concentrated liquidity provider for Uniswap V3-style pools on Doma. Mints positions, rebalances when price drifts, compounds earned fees, adapts range to realized volatility.
- Mints a concentrated LP position around current price
- Monitors position every 2 seconds
- Rebalances when price approaches range edge (configurable trigger)
- Compounds earned fees back into position every 6h
- Adapts range tightness to realized volatility (more capital efficient)
- Optional HTTP API for dashboard integration
Concentrated LP fees on swap activity. APR depends on:
- Pool fee tier (0.05% pools typically out-earn 0.30% pools by 5×+)
- Pool's daily volume
- Competition (number of other concentrated LPs at the same tick)
- Your range tightness (tighter = higher concentration multiplier)
Realistic range for active Doma pools: 50% — 500% APR at $100-$1000 capital.
- Impermanent loss — when price moves, you end up holding the worse side
- Swap costs — every rebalance costs 2 swap fees + slippage
- Dead pools — if volume drops to zero, you earn nothing while paying gas
- Slippage on big positions — too big = your own swaps move the pool
# 1. Install deps
pip install -r requirements.txt
# 2. Configure
cp .env.example .env
nano .env # fill in MNEMONIC, LP_POOL_ADDRESS, LP_TOKEN_ADDRESS, etc.
# 3. Verify Permit2 setup (does 2 one-time approvals)
python3 verify_permit2.py
# 4. Dry run first
python3 dry_run.py
# 5. Live run
python3 lp_bot.py- Visit https://doma.xyz/explore
- Click the pool you want to LP in
- Copy the pool address + the non-USDC token address
- Note the fee tier (0.01%, 0.05%, 0.30%, or 1%)
- Look up tick spacing based on fee tier (see
.env.example)
lp_bot.py— main loopdry_run.py— preview what bot would do without sending txsexit_position.py— burn position, return all funds to wallettopup_position.py— add wallet funds to existing positionrecover_position.py— handles broken/partial statesverify_permit2.py— one-time approval setupcheck_balance.py— print wallet + position state
- Start with $50-100 capital to learn the bot's behavior
- Set
DRY_RUN=truefirst - Run
dry_run.pyand read the output carefully - Set
DRY_RUN=falseand runlp_bot.pymanually - Watch the first mint + first compound cycle
- Once comfortable, run under supervisor for 24/7 operation
See INSTALL.md for:
- Generating a dedicated wallet
- Setting up supervisor for auto-restart
- Monitoring + emergency exit procedures
MIT. Use at your own risk. The bot performs real transactions that move real money.