Full text
Deterministic Band Analysis for LPs: Identifying High-Opportunity Price Ranges in Uniswap V3 Akshat Meena, Divyasshree N November 18, 2025 Abstract 1 Introduction Uniswap V3 introduced concentrated liquidity, allowing liquidity providers (LPs) to allocate capital within specific price ranges rather than across the entire price curve. This increases capital efficiency but introduces new strategic challenges: LPs must determine optimal price bands that balance potential fee earnings, competition levels, and risk exposure. The liquidity landscape in Uniswap V3 pools is dynamic and complex. Multiple positions may overlap at various price levels, creating areas of high competition where fee earnings are diluted. Conversely, gaps in liquidity often present attractive opportunities for LPs, since fewer competing positions can translate into higher fee capture. Yet it is still unclear how market makers should decide where to concentrate their capital. Should they allocate liquidity to price levels with consistently high trading volume, or to underpopulated regions where they face less competition? This work presents a reproducible, deterministic pipeline that combines on-chain data collection, bin-based liquidity analysis, and companion dashboards; it should be viewed as a work-in-progress report rather than a finished product. The accompanying implementation is available at this GitHub repository. 2 Related Work Uniswap Labs’ v3 Core documentation (2021) introduced concentrated liquidity and inspired multiple analytical studies on optimal tick placement and fee-tier selection. Subsequent industry research—for example, Uniswap Labs and Gauntlet’s report The Dominance of Uniswap v3 Liquidity (2023)—compared on-chain depth with centralized exchanges but did not release tooling for extracting or ranking individual bands. Academic analyses hosted on Zenodo and similar repositories have mined mint/burn events to characterize LP behavior, yet most stop at descriptive statistics. More recently, Urusov et al. [3] proposed τ-reset strategies that rebalance concentrated liquidity based on dynamic historical depth. That work focuses on theoretical control policies, whereas Price Band Finder now runs a deterministic Bitquery-backed binning pipeline that ingests recent positions, allocates liquidity across bins, and surfaces gap-aware bands directly through the CLI and dashboard. 1
3 Methodology Before arriving at the current workflow, we experimented with multiple regression models (e.g. XGBoost) and gap-detection heuristics. The production code now follows the deterministic dataprocessing steps described in the following subsections. Algorithm 1 summarizes this end-to-end pipeline, which no longer depends on the earlier ML prototypes. Algorithm 1 Deterministic Band Analysis Pipeline 1: Input: Bitquery API access, time window [tmin, tmax], number of bins N 2: Collect Uniswap V3 WETH/USDT positions (mint + liquidity updates) within [tmin, tmax] 3: Convert ticks to price bounds (plower, pupper) using Equation (1), compute WETH/USDT amounts, fee tier, and timestamps 4: Partition the price axis into Nequal-width bins; distribute each position’s WETH and USDT amounts proportionally across overlapping bins (Section 3.2.1) 5: Aggregate per-bin amounts, compute total liquidity values using mid-prices, and calculate competition counts and concentration metrics (Section 3.3) 6: Detect gaps where bin liquidity falls below the configured threshold and score them (Section ??) 7: Rank candidate price bands based on the deterministic scores (e.g., gap width, opportunity score) and present them via CLI/UI (Section 3.4) The subsections below describe each stage in detail. 3.1 Data Collection We collect position data from the Ethereum blockchain using Bitquery’s Uniswap API. For each Uniswap V3 position, we extract: •Position boundaries: tick ranges converted to price bounds (plower,pupper) •Liquidity amounts: WETH and USDT quantities added to each position •Temporal information: creation timestamps and liquidity modification events To keep the pipeline reproducible, we drop any Bitquery rows whose decoded data is clearly corrupted—for example, negative token amounts or tick-derived price intervals that span subatomic to astronomical magnitudes. The latest deterministic run logged dozens of such rejections before aggregation (see ‘run15.log‘), preventing the anomaly values from distorting downstream bin-level metrics. Price conversion from ticks follows Uniswap V3’s pricing formula: P=1.0001t 10(δ1−δ0)(1) where tis the tick, and δ0,δ1are the decimals of token0 and token1 respectively. Empirical assumptions. Two empirical patterns motivate the deterministic analysis choices that follow. First, liquidity providers overwhelmingly deploy capital near the prevailing spot price, so realized prices tend to oscillate inside dense bands instead of wandering into sparse regions. Second, new Uniswap V3 positions typically trail recent trading demand; the Bitquery snapshots we ingest therefore already encode the order flow that precipitated those deposits. Both assumptions let us interpret the binned liquidity curve as a near-real-time proxy for where markets expect trading to concentrate next. 2
3.2 Analyzing Liquidity Density Through Binning 3.2.1 Bin-Based Aggregation We partition the price space into Ndiscrete bins of equal width. For a price range [pmin, pmax], the bin width is: ∆p=pmax −pmin N(2) where Nis the number of bins (default: 50). Bins are created as: B={bi:bi= [pmin +i×∆p, pmin + (i+ 1) ×∆p), i = 0,1, . . . , N −1}(3) Each bin birepresents the price interval [pmin +i×∆p, pmin + (i+ 1) ×∆p). 3.2.2 Proportional Liquidity Allocation For each position with range [pl, pu] and amounts (AWETH, AUSDT), we calculate the overlap with each bin bi= [bi,lower, bi,upper]: ostart = max(pl, bi,lower) (4) oend = min(pu, bi,upper) (5) owidth = max(0, oend −ostart) (6) The proportion of the position that overlaps with bin biis: ρi=owidth pu−pl (7) The allocated amounts for bin bifrom this position are: AWETH,i =AWETH ×ρi(8) AUSDT,i =AUSDT ×ρi(9) This ensures conservation: Piρi= 1 for each position, guaranteeing that total amounts are preserved across bins. 3.2.3 Aggregation and Competition Metrics For each bin bi, we aggregate WETH and USDT amounts: AWETH,bin,i =X positions j AWETH,i,j (10) AUSDT,bin,i =X positions j AUSDT,i,j (11) Nbin,i =X positions j 1[owidth,j >0] (12) The total liquidity value in USDT equivalent for bin biis calculated using the bin’s mid-price: pmid,i =bi,lower +bi,upper 2(13) Lbin,i =AUSDT,bin,i +AWETH,bin,i ×pmid,i (14) where Lbin,i is total liquidity value, Nbin,i is position count, and pmid,i is the mid-price of bin i. 3
3.3 Concentration Metrics To quantify liquidity distribution inequality, we compute two standard metrics: 3.3.1 Gini Coefficient For sorted bin liquidity values {L1, L2, . . . , Ln}with total Ltotal =PiLi: G=2Pn i=1 i×Li n×Ltotal −n+ 1 n(15) G∈[0,1] where 0 indicates perfect equality and 1 indicates perfect inequality. 3.3.2 Herfindahl Index H= n X i=1 Li Ltotal 2 (16) H∈[1/n, 1] where 1/n indicates perfect equality and 1 indicates monopoly. 3.4 Band Suggestion Algorithm The recommender service.py module focuses on identifying the most liquid bins and enriching them with 24-hour trading volume when available. The workflow is entirely deterministic and mirrors how the production command-line tool prints the “Top 5 Price Bands by Liquidity” section found in recent run logs. Step 1: compute per-bin liquidity. For each bin we already compute Lbin,i in Section 3.3. The helper calculate total liquidity reproduces this calculation explicitly: Lbin,i =AUSDT,bin,i +AWETH,bin,i ×bi,lower +bi,upper 2.(17) Step 2: rank bins. get top liquidity bands copies each bin, attaches Lbin,i as total liquidity, and sorts the list in descending order. The caller chooses the cut-off (default: N= 5) so the recommender reports the highest-liquidity slices of the price axis. Step 3: enrich with recent trading volume (optional). When the CLI is run with Bitquery credentials, recommend top bands supplies a fetcher callback that requests the last 24 hours of swap activity for each top band, using the window [tmax −24h, tmax]. Responses are parsed by parser.parse trading volume, and the resulting USD amount is stored as trading volume 24h. Step 4: render recommendations. The function returns a single category, top liquidity bands. The CLI formatter prints each entry as “Bin i: [plower, pupper]|Lbin,i |WETH |USDT |Positions |24h Volume” which matches the structured output in run14.log. Because bands are taken directly from bin edges, we no longer emit synthetic midpoints or fixed-width recommendations; LPs can simply provision liquidity on the exact ranges returned by the recommender. 4
3.5 Data Collection Module The UniswapV3DataCollector class queries blockchain data via Bitquery’s Uniswap API. It extracts: •Position creation events (mint calls to Uniswap V3 NonfungiblePositionManager) •Liquidity modification events (IncreaseLiquidity events) •Price and tick information for WETH/USDT pairs Data is processed to convert ticks to human-readable prices, accounting for token decimal differences and token ordering. 3.6 Liquidity Analyzer The core analysis engine implements the binning and allocation algorithms described above. Key features: •Dynamic bin size adjustment to handle large price ranges efficiently •Filtering of full-range positions (extreme tick values) that would distort analysis •Support for both historical data files and real-time API fetching •Configurable analysis parameters (bin size, price range, thresholds) 4 Experimental Results We evaluated our framework on the WETH/USDT pool using last 240 hours as the collection window (the same window used for the latest model snapshot). Key findings: The deterministic CLI run spanning last 240 hours shows that the most attractive liquidity bins cluster tightly around the prevailing spot price (roughly $3,200). The top five bins cover $3,067–$3,472 and each concentrates approximately 4.46 ×108in total liquidity alongside 780–860 WETH and 470–550 concurrent positions. Despite the nearly uniform depth, the associated 24hour trading volumes diverge: bins on the lower edge of the cluster capture more than $60M and $150M of flow, while an adjacent bin records negligible activity. This dispersion highlights how the gap-aware ranking surfaces both congestion and opportunity bands, even when nominal liquidity appears flat. 4.1 Liquidity Distribution Characteristics Analysis of the collected dataset revealed: •Significant concentration around current price levels •Gini coefficients typically ranging from 0.6-0.8, indicating substantial inequality •Herfindahl indices around 0.1-0.3, suggesting moderate concentration •Clear gaps in liquidity at price levels 10-20% away from current price 5
Figure 1: An example run of the application. 5 Other Methods Tried 5.1 XGBoost-based Band Volume Prediction on Positions Data We experimented with several supervised models on historical WETH/USDT positions. A baseline linear regression (with standardized features and log targets) served as the first attempt but produced large errors even on held-out slices, indicating that relationships between liquidity features and volume are highly non-linear. The list of features included price-range width, liquidity density, fee tier, rolling volume statistics, and interaction terms (e.g., liquidity ×price center). These are standardized and fed into an XGBoost model with 200–300 trees, max depth 6–7, learning rate 0.05–0.1, and subsample/colsample of 0.8. Training uses time-based splits to avoid leakage, and compared the raw outputs against realized 24-hour trading volume gathered via Bitquery to surface error patterns. Although the regressor captures non-linear relationships and provides instantaneous predictions for arbitrary bands, it still overfits to specific training windows and degrades when the market regime shifts (e.g., when recent volumes are significantly lower than the historical training set). Consequently, the model requires frequent retraining and manual inspection of prediction error, whereas the simpler binning approach remains stable without supervision. Future work may blend both: use gap detection to seed candidate bands and the regressor to score them conditionally on up-to-date evaluation data. 6 Discussion 6.1 Limitations Several limitations should be acknowledged: •Analysis is based on historical liquidity snapshots; real-time dynamics may differ •Fee earnings are not directly modeled; suggestions focus on competition and gaps •Price volatility and impermanent loss are not explicitly considered 6
•The framework analyzes a single pool (WETH/USDT); generalization to other pairs requires validation 6.2 Next Steps in This Working Paper Potential extensions include: •Integration of fee earnings estimation based on historical volume. The current information does not consider fee ROI at all •Dynamic rebalancing recommendations as prices move •Multi-pool analysis for cross-pool arbitrage opportunities •Machine learning models to predict optimal band placement •Risk-adjusted scoring incorporating volatility and impermanent loss metrics 7 Conclusion The deterministic Bitquery pipeline reliably cleans and bins thousands of positions per run. We observe that liquidity remains concentrated near spot with minimal structural change across runs which supports the argument that both price and liquidity move and affect eachother. Whether price follows liquidity or liquidity follows price is not clear. Actionable bands emerge only when you overlay recent trade flow, since equally liquid bins can have two orders of magnitude difference in realized volume. References [1] Hayden Adams, Noah Zinsmeister, Moody Salem, and River Keefer. Uniswap v3 Core. 2021. https://uniswap.org/whitepaper-v3.pdf [2] Bitquery.io Uniswap V3 Position API.https://docs.bitquery.io/docs/blockchain/ Ethereum/dextrades/uniswap-position-api/ [3] Andrey Urusov, Rostislav Berezovskiy, Anatoly Krestenko, and Andrei Kornilov. Liquidity provision with τ-reset strategies: a dynamic historical liquidity approach. arXiv preprint arXiv:2505.15338, 2025. [4] Atis Elsts. Liquidity Math in Uniswap v3: Technical Note. 2024. [email protected]. 7