Pricing

Fixed token weights allow AMMs to achieve deterministic pricing. Tokens in liquidity pools maintain their weights (value relative to one another) even as the quantity of tokens within the pool changes. Prices adjust so that the relative value between tokens remains equal.

For example, in a pool with 50-50 weights between Asset A and Asset B, a large buy of Asset A results in fewer Asset A tokens in the pool. There are now more Asset B tokens in the pool than before. The price of Asset A increases so that the remaining Asset A tokens remain equal in value to the total number of Asset B tokens in the pool.

Deterministic pricing is the reason why liquidity is so important to AMMs. The cost of each trade is based on how much it disrupts the ratio of assets within the pool. Traders prefer deep liquid pools because each order tends to involve only a small percentage of assets within the pool. In small pools, a single order can cause dramatic price swings. It is much more difficult to purchase 1,000 ATOMs from a liquidity pool with 2,000 ATOMs than a pool with 2,000,000 ATOMs.

Low-liquidity pools result in a phenomenon called slippage, in which the cost of a trade is either much higher or lower than the trader expects. (Slippage can either be positive or negative. Positive slippage works in the trader’s favor.)

Arbitrage between liquidity pools keeps the prices of assets relatively in line with what one is seeing on centralized platforms. Imagine a scenario in which a trader buys nearly all of Asset A within a pool. The pool now contains very few units of Asset A and a plethora of Asset B. Since the total value of Asset A must equal Asset B’s total value, the price of Asset B in the pool is now extremely low!

Seeing this opportunity, arbitrage bots swoop in to buy the underpriced Asset B for selling in other markets. Eventually, this arbitrage is no longer profitable, meaning the prices of Asset A and Asset B are virtually equal to their “true” market price as reflected by other platforms.

Last updated