X*Y=K curve

The XYK Model is called the "xy=k market maker." The idea is that you have a contract that holds x token X coins and y token Y coins and always keeps the invariant that xy=k for some constant k. Anyone can buy or sell coins by essentially shifting the market maker's position on the xy=k curve, as shown below; if they change the point to the right, the amount they go to the end right corresponds to how much token X they have to put in. The amount they shift the point down corresponds to how much token Y they get out.

souce: Medium

AMM-based exchanges trade your assets against pools of tokens supplied by liquidity providers rather than an active market of buyers and sellers and an order book. The composition of these token pools, known as liquidity pools, is governed by a constant algorithmic formula that balances the token ratio within the pool. This automated market-making (AMM) process enables decentralized exchanges, or DEXs, to operate without intermediaries, ensuring trades are always available and never reliant on a third party.

The model produces a one-of-a-kind case of asset depreciation known as impermanent loss or divergence loss. When the value of tokens within a liquidity pool diverges from the value of the same tokens outside the pool, this is called impermanent loss. Because AMM formulas prioritize ratio balance, the value of your asset may differ from its value outside of the liquidity pool. Trading your tokens outside of the liquidity pool would result in a loss.

To mitigate impermanent loss and incentivize liquidity providers, decentralized finance AMMs use a stakeholder model that pays liquidity providers a percentage of all trading fees and rewards users with platform-specific tokens that can become precious assets in their own right. In liquidity pools, token pairs must maintain equal total values. The formula manages this balance of equal values: x* y = k.

x * y = k

According to this formula, the total value of one token in a Uniswap liquidity pool must always equal the total value of the other token in the pool. The automated pricing mechanism is based on maintaining the token pair's equal value relationship.

Only when prices return to where they were when you entered the pool will the temporary loss be erased. The greater the disparity between assets in the pool, the greater the potential loss. The impermanent loss in decentralized finance AMM liquidity pools made up of similarly behaving assets is significantly reduced because the pool's relative price divergence is limited.

Automated Market Maker Rewards

AMM platforms pay trading fees to liquidity pools and providers and frequently distribute platform tokens to users to mitigate impermanent loss within the decentralized finance ecosystem and incentivize users to supply tokens to liquidity pools.

More trading and volatility means more money for liquidity providers. With enough trading volume on the platform, liquidity providers can accumulate enough fees to offset the possibility of temporary loss.

Last updated