An overview of the prominent designs and large implementations
A collection of the earliest posts regarding what came to be the automated market maker and it's many variations
- Vitalik: Let's run on-chain decentralized exchanges the way we run prediction markets
- Martin Köppelmann: Gnosis Market Maker Orderbook
- Nick Johnson: Euler
A collection of popular iterations of various designs (listed below)
-
Constant Product
Formula:
(R_a - delta_a)(R_b + fees * delta_b) = k
Simplified Formula:x * y = k
Where R_α and R_β are reserves of each asset and γ is the transaction fee. Trading any amount of either asset must change the reserves in such a way that, when the fee is zero, the product R_αR_β remains equal to the constant k. This is often simplified in the form of xy=k, where x and y are the reserves of each asset. In practice, because Uniswap charges a 0.3% trading fee that is added to reserves, each trade actually increases k.
-
Stableswap (Hybrid)
Where x is the reserves for each asset, n is the number of assets, D is an invariant that represents the value in the reserve, and A is the “amplification coefficient”, which is a tunable constant that provides an effect similar to leverage and influences the range of asset prices that will be profitable for liquidity providers (i.e. the higher the asset volatility, the higher A should be).
Function:
An^n SUM(x_i) + D = ADn^n + D^(n+1) / n^n ∏ x_i
This function acts as a constant sum when the portfolio is balanced and shifts towards a constant product as the portfolio becomes more imbalanced. In effect, the function looks like a “zoomed-in hyperbola”.
-
Constant Mean
A constant mean market maker is a generalization of a constant product market maker, allowing for more than two assets and weights outside of 50/50. First introduced by Balancer, constant mean markets satisfy the following equation in the absence of fees:
Formula:
k = ∏_n R^W_i
where R is the reserves of each asset, W is the weights of each asset, and k is the constant. In other words, in the absence of fees, constant mean markets ensure that the weighted geometric mean of the reserves remains constant.
-
Concentrated Liquidity
The defining idea of Uniswap v3 is concentrated liquidity: liquidity that is allocated within a custom price range. In earlier versions, liquidity was distributed uniformly along the price curve between 0 and infinity.
The previously uniform distribution allowed trading across the entire price interval (0, ∞) without any loss of liquidity. However, in many pools, the majority of the liquidity was never used.
Concentrated Liquidity relies on the concept of virtual liquidity which can be read and derived in their whitepaper
Source Constant Function Market Makers: DeFi’s “Zero to One” Innovation
A virtual automated market maker (vAMM) uses formulas, such as constant product, but only as a price discovery mechanism.
Generally a vAMM product is designed with a "clearing house" or "controller" contract in which all of the collateral deposited is held.
vAMMs are primmarily used for perpetual future contracts in which the collateral in the clearing house backs virtual assets that users can trade.
Following the release of Perpetual Protocol's first vAMM there have been many iterations since, particularly with the price discovery mechanism.
- Drift: dAMM Deep Dive
- Perpetual Protocol: A deep dive into our vAMM
- Perpetual Protocol: vAMM Documentation
- Perpetual Protocol V2 Design
- On vAMM's unnecessity for liquidity pool
- Concentrated Liquidity and Option Payoffs
- Uniswap V3 LP Tokens as Perpetual Put and Call Options
- Synthetic Options and Short Calls in Uniswap V3
- A Guide for Choosing Optimal Uniswap V3 LP Positions, Part 1
- How to Create Perpetual Options in Uniswap v3
- Understanding the Value of Uniswap v3 Liquidity Positions
- Pricing Uniswap v3 LP Positions: Towards a New Options Paradigm?
- On-chain Volatility and Uniswap v3
- Calculating the Expected Value of the Impermanent Loss in Uniswap
- How to deploy delta-neutral liquidity in Uniswap — or why Euler Finance is a game changer for liquidity providers
- Designing a constant volatility AMM
- Panoptic
- Replicated Market Makers
- Other use cases of AMMs for pricing
There have been various implementations for an AMM that can be used for buying and selling of options.
- Just and Time Liquidity
- First posted about in Hacker News by Doug Colkitt
- JIT Liquidity in Crocswap Whitepaper
- Quantifyng ‘Just-in-Time’ liquidity in Uniswap v3
- Impermanent Loss and JIT Liquidity in the Uniswap ETH/USDC 0.3% Pool
- Uniswap V3 JITters
- Uniswap V3 JIT Volume
- Daniel Robinson - Uniswap v3, or How I Learned To Stop Worrying And Love Concentrated Liquidity
- 01 zAMM
- Liquidity deposited by stakers is placed as limit orders on the orderbook following the constant product formula
- Similar to Raydium and Atrix
- How it Works
- Introducing Drift V2: Just in Time Liquidity
- Cowswap
- Crocswap
- TWAMM
- Sovryn
- Blackholeswap
- Proactive Market Makers
- Rainbow Network
- Polymarket
- Augur
- GooseFX
- A window into AMM 2.0 — Introducing Volatility Adjusted Fee
- Introducing Volatility-Adjusted Fees
- The Dominance of Uniswap v3 Liquidity
- Uniswap v3: The Universal AMM
- Liquidity Mining on Uniswap v3
- Understanding Automated Market-Makers, Part 1: Price Impact
- An analysis of Uniswap markets
- AMMs as serviced infrastructure
- The Economics of Automated Market Makers
- A General Framework for Impermanent Loss in Automated Market Makers
- Concentrated Liquidity in Automated Market Makers
- Optimal Fees for Geometric Mean Market Makers
- Improved Price Oracles: Constant Function Market Makers
- Optimal Routing for Constant Function Market Makers
- When does the tail wag the dog? Curvature and market making
- Yield Space: An automated Liquidity Provider for Fixed Tokens
- Part 1: A brief overview of 1st generation AMMs
- Part 2: A brief look into 2nd generation AMMs
- Dynamic Curves for Decentralized Autonomous Cryptocurrency Exchanges
- Price Discovery and AMMs
- Automated Market Makers (AMMs): Versioning Up