Constant Product Formula
The Constant Product Formula is a mathematical model used by decentralized exchanges to determine asset prices and facilitate automated trading. It is expressed as x multiplied by y equals k, where x and y are the reserves of two assets in a pool and k is a constant.
This formula ensures that there is always liquidity available for trades, as the price increases exponentially as the pool approaches exhaustion. It creates a self-balancing mechanism that allows for continuous price discovery without the need for an order book.
While simple and effective, it exposes liquidity providers to impermanent loss when the price of the assets in the pool diverges from the broader market. It remains the most widely used pricing model in decentralized finance.