Formalization of Mechanisms


Overall, the functionality of an AMM can be generalized formally by a set of few mechanisms. These mechanisms define how users can interact with the protocol and what the response of the protocol will be given particular user actions.
A. State space representation
The functioning of any blockchain-based system can be modeled using state-space terminology. States and agents constitute the main system components; protocol activities are described as actions; the evolution of the system over time is modelled with state transition functions.
The most critical design component of Luntivo is its conservation function which defines the relationship between different state variables and the invariant(s). The conservation function is protocol-specific as each protocol seeks to prioritize a distinct feature and target particular functionalities.
The core of an AMM system state is the quantity of each asset held in a liquidity pool. Their sums or products are typical candidates for invariants. Examples of a constant-sum market maker include mStable. Uniswap represents constant-product market makers, while Balancer generalizes this idea to a geometric mean. The Curve conservation function is notably a combination of constant-sum and constant-product.
B. Liquidity change and asset swap
Hyperparameter set Ω is determined at pool creation and shall remain the same afterwards. While this value of hyperparameters might be changed through protocol governance activities, this does not and should not occur on a frequent basis.
Invariant C, despite its name, refers to the pool variable that stays constant only with swap actions but changes at liquidity provision and withdrawal. In contrast, trading moves the price of traded assets; specifically, it increases the price of the output asset relative to the input asset, reflecting a value appreciation of the output asset driven by demand. Liquidity provision and withdrawal, on the other hand, should not move the asset price. In particular, a pure liquidity provision and withdrawal activity requires a proportional change in reserves.
Copy link