Constant Product Market Maker
A Constant Product Market Maker is a specific type of AMM algorithm defined by the formula x times y equals k, where x and y represent the quantities of two assets in a pool and k is a constant. This formula ensures that the pool always has liquidity for both assets, regardless of the size of the trade, as the price moves along a hyperbolic curve.
As a trade occurs, the balance of the assets changes, causing the price to adjust automatically based on the new ratio. This mechanism provides a simple and effective way to facilitate decentralized trading without the need for centralized intermediaries or complex order matching engines.
While it guarantees liquidity, it also creates slippage for large trades because the price impact increases as the trade size relative to the pool size grows. This model serves as the foundational architecture for many prominent decentralized exchanges in the cryptocurrency ecosystem.