Amplification in an Automated Market Maker
Typical Liquidity Pool
x * y = k
In constant product automated market maker: x is the first token y is the second token k is the constant x and y must always multiply to form k
A pool will start with a equal number of both tokens In this instance, we can start with 5000 Apples and 5000 Bananas
Taking Apples as x, and Bananas as y, 5000 (Apples) * 5000 (Bananas) = 25,000,000 (k) The constant is 25,000,000
APPLE-BANANA Liquidity Pool
There are currently 5000 Apples and 5000 Bananas in the pool.
Swap
From:
ApplesTo:
BananasAmplified Liquidity Pool
ax * ay = k * a^2
In a dynamic market maker: Both x and y are amplified by a ax and ay are thus virtual balances ax and ay must always multiply to form k * a * a.
A pool will start with a equal number of both tokens In this instance, we can start with 5000 Apples and 5000 Bananas
Amplification:
Taking Apples as x, and Bananas as y, you can set amplification above accordingly. The amplified amount of Apples is: 2,000,000 (5000 Apples * 400 amplification = 2,000,000) The amplified amount of Bananas is: 2,000,000 (5000 Bananas * 400 amplification = 2,000,000) 2,000,000 (Apples) * 2,000,000 (Bananas) = 4,000,000,000,000 (k) The amplified constant is 4,000,000,000,000
APPLE-BANANA Liquidity Pool
There are currently 5000 Apples and 5000 Bananas in the pool.
Swap
From:
ApplesTo:
Bananas