Liquidity Math in Uniswap v3
8 Pages Posted: 20 Sep 2023
Date Written: September 30, 2021
Abstract
Uniswap is the largest decentralized exchange (DEX) and one of cornerstones of Decentralized Finance (DeFi). Uniswap uses liquidity pools to provide Automated Market Making (AMM) functionality. Uniswap v3 is the most recent version of the protocol that introduces a number of new features, notably the concentrated liquidity feature, which allows the liquidity providers to concentrate their liquidity in a specific price range, leading to an increased capital efficiency. However, the mathematical relationship between the liquidity of a position, the amount of assets in that position, and its price range becomes somewhat complex. This technical note shows how derive some of the results from the Uniswap v3 whitepaper, as well as presents several other equations not discussed in the whitepaper, and shows how to apply these equations.
Keywords: Decentralised Finance, Automated Market Making, Smart Contracts, Concentrated Liquidity
JEL Classification: C65,G23
Suggested Citation: Suggested Citation