AI-Driven DEX Liquidity Manager on opBNB
Reduce slippage and impermanent loss with intelligent liquidity rebalancing. The first AI-driven DEX liquidity orchestrator on opBNB.
DeFi liquidity providers face significant challenges:
- Impermanent Loss (IL): Up to 40% loss in volatile markets.
- Manual Position Management: Hours spent monitoring and adjusting ranges.
- High Slippage: Large trades on thin pools incur heavy slippage.
- Static LP Positions: Most LPs use V2-style pools without optimization.
Adaptive Liquidity Orchestrator uses AI-driven algorithms to automatically manage LP positions:
- Real-time Volatility Monitoring: Tracks market conditions using simple-statistics and on-chain data.
- Intelligent Rebalancing: Automatically adjusts liquidity ranges based on AI recommendations.
- Slippage Reduction: Optimizes depth across price ranges.
- IL Protection: Shifts liquidity to stable pools during volatility spikes.
flowchart TB
subgraph Frontend["Frontend (React + Vite)"]
UI[User Interface]
Wallet[Wallet Connection]
Charts[Metrics Charts]
end
subgraph Backend["Backend (Fastify)"]
API[REST API]
Optimizer[AI Optimizer]
Relayer[Transaction Relayer]
end
subgraph Blockchain["opBNB L2"]
VM[VaultManager]
SM[StrategyManager]
RE[RebalanceExecutor]
DEX[PancakeSwap V3]
end
subgraph External["External"]
Oracle[Binance Oracle]
Scan[opBNBScan]
end
UI --> API
Wallet --> VM
API --> Optimizer
Optimizer --> Relayer
Relayer --> RE
RE --> VM
VM --> DEX
Oracle --> SM
VM --> Scan
- Node.js 20+
- npm or yarn
- MetaMask wallet (opBNB Testnet)
# Clone the repository
git clone https://github.com/0xsupremedev/adaptive-liquidity-orchestrator.git
cd adaptive-liquidity-orchestrator
# Install dependencies (Root, Backend, Frontend)
npm run install:all # (Hypothetical script, or run manually)Create a .env file in the root:
PRIVATE_KEY=your_private_key
OPBNBSCAN_API_KEY=your_api_key
VITE_THIRDWEB_CLIENT_ID=your_thirdweb_client_id-
Smart Contracts Node:
npm run node npm run deploy:local
-
Backend:
cd backend npm run dev -
Frontend:
cd frontend npm run dev
The optimizer uses volatility-based heuristics:
- Volatility Detection: Calculates Exponential Moving Average (EMA) of price changes.
- Threshold Comparison: Recommendations trigger if volatility > 5%.
- Action Selection:
- High Volatility: Widen range + move to stable pool.
- Trending Up: Shift range upwards.
- Trending Down: Shift range downwards.
Built for the BNB Chain Hackathon 2025.
- Innovation: First AI-driven LP manager on opBNB.
- Integration: Native opBNB L2 deployment, Thirdweb Auth, RainbowKit.
- User Experience: Premium "Minimal Animated Hero" UI.
This project is licensed under the MIT License - see the LICENSE file for details.