Dynamic Weights

InterSwap introduces a new mechanic for the dynamic change of tokens weights during single-asset liquidity provision/removing. Adding Liquidity, proportionally increases the weight of the asset and vice versa: removing liquidity decreases the weight.

Liquidity provision/removing does not affect the quotes. Such a mechanic eliminates the possibility of draining the pool.

Let's take an example of such initial pool with equal weights:

Asset
Reserve
Weight Points

BNB

20000

1000

ETH

5000

1000

AVAX

45000

1000

Total Weight: 3000

We are adding liquidity with amount of 20 ETH. How much weigh points we should add to ETH?

price per point = reserve / points count.

p=a/(r/t)p = a / (r / t)

Where

  • p - points to be added or reduced.

  • a - amount of tokens added or removed.

  • r - current reserve of token.

  • t - total points.

In our example: points = 20 / (5000 / 1000) = 4

Asset
Reserve
Weight Points

BNB

20000

1000

ETH

5020

1004

AVAX

45000

1000

Total Weight: 3004

Last updated