Skip to content
Liquidity Lens

Rangefinder, LP range and capital backtests

Test a range or a capital size against the swaps that actually hit the pool, before you deploy.

Two studies on replayed state: a range backtest that ranks range widths by fees minus divergence loss and gas, and a depth curve that shows how much of a pair's volume and fees added capital would capture.

  • ALMs and vault managers
  • LP funds
  • DEX teams

Your range on the real price path

Live data· block 53,134,715

A range centred on WETH's executable mid at the start of the window, against every published minute since. Move the width and the window: the path is real, the range is yours.

Loading chart…
Time in range
–
Exits
–
times the price left the range
Longest time out
–
At the end
–

Which width stays in range

Same live path

Every candidate width on the same path. Click a bar to draw it above. A tighter range earns more per dollar while it is in range, and leaves it more often.

Loading chart…

Computed in your browser from the free public price history (executable mid of a $1K trade, per published minute). Fees, divergence loss and gas come from the keyed backtest, which replays every swap of the pool.

What the backtest adds

Sample response · illustrative numbers

The keyed range backtest forks the pool at a block, replays every swap of the next 24 hours and ranks widths by fees minus divergence loss and gas, for $250K per range.

Example response of POST /ext/market/lp-research; your own pool and widths get their own replay.

How much capital the pool can use

Sample response · illustrative numbers

The depth curve routes 168 hours of the pair's real trade sizes through the production router with your capital added, and reports the pool's share of volume and your capital's fees.

Depth curve sample
Capital addedPool shareYour fees / day
Today2.19%$0.00
+$250K2.44%$173.44
+$1.00M3.19%$774.86

Example response of POST /ext/market/depth-curve (Aerodrome v2 WETH/USDC in the example).

What Rangefinder gives you

Backtest on the real price path

The pool is forked at a block you pin and every swap of the window is replayed in order. Your range earns what its liquidity would have supplied on each of those swaps.

Size capital with the production router

The depth curve routes the window's real trade sizes through the same router as Truefill, across every pool of the pair, with your capital added to the pool.

Every assumption on the label

Each result lists what is exact and what is modelled, and counts the hours replayed, modelled and missing. You see how much of the answer is replay.

Ask once, read again for free

Results are cached by pool, block and parameters for 14 days. An identical request returns the cached result and does not count toward the daily task cap.

How it works

  1. 01

    Pin a block

    Choose a block within the last 14 days. The engine forks the exact state at that block.

  2. 02

    Replay or route

    A range backtest replays the pool's swaps forward. A depth curve routes the pair's trade sizes with your capital added.

  3. 03

    Read ranked results

    Poll the task. You get ranked ranges or capital points, with fees, costs and the method behind them.

Call it from code

Forks a concentrated pool at a block you pin in the last 14 days, replays every swap of the horizon after it, and ranks your candidate range widths by fees minus divergence loss and gas.

POST /api/v1/ext/market/lp-research · 50 CU

Send your key in x-api-key.

The answer is a task id. Poll /ext/market/research-task for the ranked result.

Example values are illustrative. Token addresses are real Base contracts; amounts are raw integer units as decimal strings.

curl -s -X POST "https://llens.abanchev.com/api/v1/ext/market/lp-research" \
  -H "x-api-key: $LL_API_KEY" \
  -H "content-type: application/json" \
  -d '{"chainId":"8453","pool":"0xd0b53d9277642d899df5c87a3966a349a798f224","block":"52870000","halfWidthsBps":[50,100,250,500],"horizonHours":24,"capitalUsd":"250000","gasUsdPerAction":"0.05"}'
Example response
{
  "taskId": "3f8f6a52-6f0e-4d2b-9a43-1b2c3d4e5f60",
  "status": "queued",
  "cached": false,
  "attachedToTaskId": null
}

Plans

  • Pro
  • Enterprise

Runs on a shared engine lane: one task at a time and 20 a day per organization. Repeat questions are free.

Pricing on request.

Good to know

  • Range backtests support concentrated pools (Uniswap v3 and v4 style).
  • Fixed-path model: your position is assumed not to move the price or the order flow. Divergence loss at the end of the window stands in for LVR.
  • Swap-level replay covers about the last day. Older hours of a window are modelled from exact hourly rows, and the result counts them.
  • One task at a time and 20 a day per organization.
Liquidity LensPrices are informational and instantaneous. They are not investment advice or a guarantee of execution.