Skip to main content

Dynamic Weights Visual Guide

Dynamic weights let scale adapt as trades and configuration change pool state.

The price of asset i in scale terms is:

Pi=siαiP_i = \frac{s_i}{\alpha_i}

where s_i is scale and \alpha_i is reserve.

After a state change:

Pi=si+Δsiαi+ΔαiP_i' = \frac{s_i + \Delta s_i}{\alpha_i + \Delta \alpha_i}

The tutorial below visualizes how scale affects price and weight.

1000100200300400LP Token
PLP=4.00P_{LP} = 4.00
PLP,A=2.00P_{LP,A} = 2.00
wLP=100.0w_{LP} = 100.0%
Token A
PA=2.00P_{A} = 2.00
PA,A=1.00P_{A,A} = 1.00
wA=25.0w_{A} = 25.0%
Token B
PB=1.00P_{B} = 1.00
PB,A=0.50P_{B,A} = 0.50
wB=18.8w_{B} = 18.8%
Token C
PC=1.00P_{C} = 1.00
PC,A=0.50P_{C,A} = 0.50
wC=18.8w_{C} = 18.8%
Token D
PD=1.00P_{D} = 1.00
PD,A=0.50P_{D,A} = 0.50
wD=18.8w_{D} = 18.8%
Token E
PE=1.00P_{E} = 1.00
PE,A=0.50P_{E,A} = 0.50
wE=18.8w_{E} = 18.8%
ScaleReserve