Writing
Demo · Meteora DLMM

DLMM liquidity simulator

Hard problem
A concentrated-liquidity position earns fees and accrues impermanent loss at the same time, and which one wins depends on a bin range, a distribution shape and a price path nobody knows in advance. Intuition about whether the position beat simply holding is usually wrong.
Approach
Simulate it rather than argue about it. Choose the bins, the shape and the side to fund, then scrub a seeded price walk while a generator derives per-bin liquidity, fee accrual and impermanent loss against HODL — reproducible from the seed, not hand-computed.

A concentrated-liquidity position on Meteora is derived from a few rules — a price range of discrete bins, a distribution shape, and which side you fund. Scrub a seeded price walk: the active bin moves, in-range bins earn fees, and crossed bins flip token composition — which is exactly what creates impermanent loss.

Liquidity shape
Side
✓ In range — earning fees · 87.50% of the walk in rangefees $105.00 · IL $-8.64 · net $108.72 (+10.87%)
■ quote (below)■ active bin■ base (above)active price $157.50
— LP position value- - HODL value
step 40 / 40 · active bin 24price $157.50
Position value$1,003.72
HODL value$1,012.35
Fees earned$105.00
Impermanent loss$-8.64
Base / quote held0.67 / 897.96
Net P&L+$108.72

Position ledger · derived

StepPriceBinFeesValueILNet
1150.0003.00987.960.00-9.04
2150.8836.00990.72-0.11-3.28
3148.77-49.00983.90-0.06-7.10
4149.17-312.00985.380.12-2.62
5151.75615.00993.39-0.288.39
6154.321418.00998.62-3.4116.62
7153.521221.00997.39-2.0318.39
8154.361424.00998.76-3.3722.76
9155.731927.001,000.57-6.0327.57
10155.641830.001,000.51-5.8130.51
11158.412730.001,002.33-12.9932.33
12158.472730.001,002.36-13.1532.36
13158.702830.001,002.45-13.8032.45
14157.162333.001,001.82-9.4334.82
15156.952336.001,001.68-8.9037.68
16155.972039.001,000.86-6.5439.86
17154.531542.00999.04-3.6741.04
18154.761645.00999.41-4.0344.41
19152.911048.00996.34-1.0844.34
20152.67951.00995.86-0.7846.86
21154.251454.00998.81-3.0052.81
22153.481157.00997.62-1.6654.62
23152.24760.00995.22-0.0355.22
24150.30163.00990.251.3153.25
25150.22166.00990.011.3356.01
26150.93369.00992.121.1461.12
27152.65972.00996.37-0.2268.37
28151.93675.00994.860.6369.86
29150.77378.00991.931.4669.93
30151.81681.00994.700.8575.70
31152.31884.00995.880.4179.88
32153.851387.00998.95-1.5485.95
33152.62990.00996.700.2286.70
34153.981393.00999.32-1.5892.32
35154.031396.00999.41-1.6695.41
36155.651899.001,001.97-4.37100.97
37158.422799.001,004.20-11.14103.20
38157.3824102.001,003.64-8.34105.64
39158.9729102.001,004.70-12.43106.70
40157.5024105.001,003.72-8.64108.72