Skip to main content

Dynamics Weights

The price of the iith token in the pool in terms of our internal numeraire, scale, is simply

Pi=siαi,P_i = \frac{s_i}{\alpha_i},

where sis_i is the token's scale and αi\alpha_i is the token's reserve so changes in the price of a token can be expressed as

Pi+ΔPi=si+Δsiαi+Δαi.P_i + \Delta P_i = \frac{s_i + \Delta s_i}{\alpha_i + \Delta \alpha_i}.

With Multiswap, there are two extreme ways to change the price of a token:

  1. Trading: Holding the scale constant (Δsi=0\Delta s_i = 0) and changing the reserves; or
  2. Reallocating: Holding the reserves constant (Δαi=0\Delta \alpha_i = 0) and changing the scale.

Recall that the weight of a token is given by

wi=sis0,w_i = \frac{s_i}{s_0},

where s0s_0 is the scale of the LP token given by

s0=j=1nsjs_0 = \sum_{j=1}^n s_j

so that changing the scale of a token also changes the weights.

In this simple tutorial, we focus on how changing the scale of a token affects the prices and weights.

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