Overview
| Property | Value |
|---|---|
| Position Type | LP |
| P&L Calculation | Fees earned - impermanent loss - tx fees |
| keep_position | Configurable |
| Use Cases | Earning LP fees, concentrated liquidity, range trading |
Configuration
Parameters
| Parameter | Description |
|---|---|
connector_name | DEX connector (meteora, raydium, orca, uniswap) |
pool_address | On-chain pool address |
trading_pair | Token pair (e.g., SOL-USDC) |
lower_price | Price range lower bound |
upper_price | Price range upper bound |
base_amount | Base token to deposit |
quote_amount | Quote token to deposit |
side | 0=both sides, 1=buy only, 2=sell only |
auto_close_above_range_seconds | Close if above range for N seconds |
auto_close_below_range_seconds | Close if below range for N seconds |
Lifecycle States
| State | Description |
|---|---|
NOT_ACTIVE | Initial state |
OPENING | Adding liquidity |
IN_RANGE | Position active, price within range |
OUT_OF_RANGE | Price moved outside range |
CLOSING | Removing liquidity |
COMPLETE | Position closed |
FAILED | Failed after retries |
How It Works
- Open: Deploys liquidity at configured price range
- Monitor: Tracks if current price is within range
- Fees: Accumulates trading fees while in range
- Close: Removes liquidity when conditions met
P&L Tracking
The executor tracks:| Metric | Description |
|---|---|
base_fee | Fees earned in base token |
quote_fee | Fees earned in quote token |
position_rent | Solana rent for position NFT |
tx_fee | Transaction fees |
impermanent_loss | Value loss from price movement |
Example: SOL-USDC LP
Example: Single-Sided LP
Via API
Position Handover
Whenkeep_position=true and executor closes:
- LP position is always closed on-chain (liquidity withdrawn)
- Net token change tracked in Position Hold
- ADD events → SELL (tokens deposited)
- REMOVE events → BUY (tokens + fees returned)

