Constant Product Invariant Models
Constant product invariant models are the mathematical backbone of many decentralized exchange liquidity pools. They use the formula x multiplied by y equals k, where x and y are the quantities of two assets in a pool, and k is a constant.
This model ensures that there is always liquidity available for any trade, as the price moves along a hyperbolic curve. When a user buys asset x, they add asset y to the pool, and the price of x increases according to the ratio of the assets.
This simple yet effective mechanism allows for automated price discovery without the need for a central order book. It is the foundation of many popular DeFi protocols, enabling decentralized trading and yield generation.