Cost Function

Formula

In the context of Automated Market Makers, the cost function is a mathematical formula that governs the relationship between the reserves of different assets within a liquidity pool. This function defines the invariant, ensuring that the product of the asset quantities remains constant in a simple constant product market maker model. More complex cost functions, such as those used in concentrated liquidity models, introduce additional variables to optimize capital efficiency within specific price ranges.