docs: create GEMINI.md with project context and current setup
This commit is contained in:
45
doc/GEMINI.md
Normal file
45
doc/GEMINI.md
Normal file
@ -0,0 +1,45 @@
|
||||
# GEMINI Project Context & Setup
|
||||
|
||||
**Last Updated:** 2025-12-19
|
||||
**Project:** Uniswap V3 Automated Concentrated Liquidity Pool (CLP) Hedger
|
||||
|
||||
## 1. Project Overview
|
||||
This project automates the management and hedging of Uniswap V3 Concentrated Liquidity Positions (CLP). It consists of two main components:
|
||||
* **`uniswap_manager.py`**: Monitors the market, mints/burns Uniswap V3 positions based on range and profitability, and handles rebalancing.
|
||||
* **`clp_hedger.py`**: A delta-neutral hedging bot that executes trades on Hyperliquid to offset the delta exposure of the Uniswap position.
|
||||
|
||||
## 2. Current Configuration (Weekend / Low Volatility)
|
||||
**Date Set:** 2025-12-19
|
||||
|
||||
### A. Uniswap Manager Settings
|
||||
* **Capital Target:** `$2,000` (USDC equivalent)
|
||||
* **Range Width:** `+/- 1%` (0.01) relative to entry price.
|
||||
* **Slippage Tolerance:** `2%` (0.02)
|
||||
|
||||
### B. Hedger Settings (Hyperliquid)
|
||||
* **Minimum Trade Threshold:** `0.008 ETH` (~$24 USD)
|
||||
* *Reasoning:* Tighter threshold for precise hedging in a narrow 1% range.
|
||||
* **Dynamic Threshold Multiplier:** `1.2x`
|
||||
* *Reasoning:* Reduced volatility buffer for stable weekend conditions.
|
||||
* **Price Buffer:** `0.15%`
|
||||
|
||||
### C. Safety Mechanisms
|
||||
1. **Dynamic Edge Proximity:**
|
||||
* **Logic:** Calculates a dynamic safety buffer based on position size to prevent slippage on large hedges near range edges.
|
||||
* **Formula:** `Base 4% + (0.000004 * Position Value USD)`
|
||||
* **Limits:** Min 4%, Max 15%.
|
||||
* **Current Effect:** For a $2,000 position, the edge buffer is approx **4.8%**.
|
||||
2. **Large Hedge Override:**
|
||||
* **Logic:** Bypasses trade cooldowns if the required hedge size exceeds `2.8x` the rebalance threshold.
|
||||
3. **Cooldowns:**
|
||||
* `MIN_TIME_BETWEEN_TRADES`: 25 seconds (bypassed for critical/urgent hedges).
|
||||
|
||||
## 3. Recent Changes & Status
|
||||
* **Refactoring:** Removed `clp_scalper_hedger.py` after merging its advanced features into `clp_hedger.py`.
|
||||
* **Logging:** Fixed duplicate terminal output by disabling logger propagation.
|
||||
* **Feature:** Implemented "Comprehensive Edge Protection" in `clp_hedger.py` (Dynamic Proximity + Large Hedge Override).
|
||||
|
||||
## 4. Key Files
|
||||
* `uniswap_manager.py`: Core logic for Uniswap V3 interaction.
|
||||
* `clp_hedger.py`: Core logic for Hyperliquid hedging.
|
||||
* `doc/CHANGELOG.md`: Detailed history of changes.
|
||||
Reference in New Issue
Block a user