Swap Examples
Below are some examples of trades on the CFMM swap, calculated with the assumption starting liquidity pools of 1,000,000 in each of the two assets.
# | Pre Trade Asset1 Pool | Pre Trade Asset2 Pool | Pre Trade Pool Ratio | Trade Asset1 In | Trade Asset2 Out | Trade Trade FX | Post Trade Asset1 Pool | Post Trade Asset2 Pool | Post Trade Pool Ratio |
---|---|---|---|---|---|---|---|---|---|
1 | 1,000,000.00 | 1,000,000.00 | 1.0000 | 1,000.00 | 1,000.00 | 1.0000 | 1,001,000.00 | 999,000.00 | 1.0020 |
2 | 1,000,000.00 | 1,000,000.00 | 1.0000 | 10,000.00 | 10,000.00 | 1.0000 | 1,010,000.00 | 990,000.00 | 1.0202 |
3 | 1,000,000.00 | 1,000,000.00 | 1.0000 | 100,000.00 | 100,000.00 | 1.0000 | 1,100,000.00 | 900,000.00 | 1.2222 |
4 | 1,000,000.00 | 1,000,000.00 | 1.0000 | 500,000.00 | 499,032.59 | 1.0019 | 1,500,000.00 | 500,967.41 | 2.9942 |
5 | 1,000,000.00 | 1,000,000.00 | 1.0000 | 750,000.00 | 728,519.42 | 1.0295 | 1,750,000.00 | 271,480.58 | 6.4461 |
When starting from a balanced pool, even on trades which are very large (75%) compared to the pool size, the traded FX remains very close to 1.00.