Dom Steil

Uniswap

Dom Steil
Dom Steil

AMM: Automated Market Makers

CFMMs: Constant Function Market Makers

Problem: in V1, V2 of the Uniswap Protocol, only a fraction of the assets are available at a certain price.

In v1, v2: liquidity is distributed along an x*y=k price curve, with assets reserved for all prices between 0 and infinity.

The is the onchain liquidity pool model of 1 constant product with two reserve coins:

Swap Orders:

swap x to y = limit buying order y from x

swap y to x = limit order selling y for x

order price: price of y over x

Swap Price variables:

RX : X amount in the liquidity pool

RY : Y amount in the liquidity pool

P : swap price

BX : x amount of Buy orders w/ price > p

SY : y amount of Sell Orders w/ price < p

PSP : x/y

How it works:

If the quantity of orders which swap x for y with a higher price than that of PSP is greater than the quantity of y at the last price + the quantity of orders which swap y for x with a lower price than that of PSP: the price goes up.

If the quantity of orders which swap y for x with a lower price than that of PSP is greater than the quantity of x at the last price + the quantity of orders which swap x for y with a higher price than that of PSP: the price goes down.

LPs can deposit funds, earn market making fees and receive pool tokens.

Uniswap V3

In Uniswap V3 the protocol gives Liquidity Providers (LPs) more control over the price ranges in which their capital is used.

It also provides flexible fees (0.05%, 0.30%, and 1.00%) for market makers. This is enabled by one major upgrade to the protocol: concentrated liquidity.

Concentrated Liquidity: liquidity bounded within some price range. This liquidity concentration to a finite range is called a position. LPs can combine any number of distinct concentrated positions within a single pool.

A position only needs to maintain enough reserves to support trading within it's range; it's virtual reserves.

The range is denoted by the maker via ticks and when the price moves below or above a tick as it become active or inactive. eg. If market prices move outside an LPs price range, their liquidity is effectively removed from the pool and no longer earning fees.

This allows liquidity providers to create many positions and be able to fluidly move tokens across bands to keep their liquidity active.

In V3 it's all about the flexibility and capital efficiency (especially for professional market makers); however the dynamics between active versus passive LPs still remains a big question.

To learn more check out:

the uniswap contracts at GitHub.com/Uniswap/uniswap-v3-periphery

uniswap.org/blog/uniswap-v3

https://research.parsec.finance/posts/uniswap-v3-vs-LOB

Important the Disclosures: The content of this post is provided for informational purposes only. Nothing herein constitutes investment, legal, or tax advice or recommendations. Nothing on this site should not be relied upon as a basis for making an investment decision and is not an offer to provide advisory services. It should not be assumed that any investment in the asset class described herein will be profitable and there can be no assurance that future events and market factors would lead to results similar to any historical results described in this paper. The assets discussed herein are not representative of all assets in which Syndicate invests. Any projections, estimates, forecasts, targets, prospects and/or opinions expressed in this paper are based on the subjective views of its author, are subject to change without notice and may differ or be contrary to views expressed by others. Certain information contained on this site has been obtained from third-party sources. While such information is believed to be reliable for the purposes used herein, Syndicate has not independently verified such information and makes no representation or warranty, express or implied, as to the accuracy or completeness of the information contained herein.