Uniswap is the “OG” decentralized exchange (DEX). Launched on the Ethereum mainnet as a proof-of-concept in November 2018, Uniswap pioneered the automated market maker (AMM) model, which automated liquidity provision unlike the traditional order book model on centralized exchanges.
May 2020 saw its V2 upgrade and a year later on May 5th 2021, Uniswap V3 was launched.
The problems of the old Uniswap
The primary upgrade of Uniswap V3 is its concentrated liquidity mechanism, which allows liquidity providers (LPs) to provide liquidity within a customized price range.
This is a fundamental change from the x*y=k constant product AMM model that Uniswap was famous for innovating, where x and y represents the reserves of two assets while k is a constant.
This simple formula aggregated all liquidity in a pool along the entire price curve, allowing Uniswap to automatically facilitate trades between buyers and sellers without having to act as an active intermediary.
The problem with this model however, is capital inefficiency.
Because x*y=k ensures that liquidity is always available at any given possible price, liquidity is spread thin along the curve.
To balance the liquidity pool, liquidity incentives instead to attract new liquidity when either x or y is scarce to keep k constant. The result is that most of the provided liquidity tends to go unused.
This model is also part of the reason for slippage risks on DEXes, where traders buy or sell at a different price than when they executed the trade.
Enter Uniswap V3
V3’s concentrated liquidity mechanism is an attempt to solve this problem by allowing LPs to make targeted liquidity provision at specific price bands.
The following graphs from Uniswap’s blog illustrates how the concentrated liquidity mechanism works:
There are few implications of V3’s new model:
- First, V3 forces LPs to take on a more active role compared to V2 where it was an equal playing field. This creates competition between LPs as the better LPs are the ones who correctly predict the price action and shift their positions closer to those price bands and earn trading fees. For passive LPs who do not want to actively manage their positions on V3, yield aggregators that optimize trading strategies have emerged to provide this service.
- LPs face a tradeoff decision: Concentrate your liquidity provision and make more fees if you guess the price action right, but guess wrongly and suffer a higher impermanent loss.
- This lets LPs reduce their investment risk when the price of the cryptocurrency drops beyond a certain point, acting as a kind of a stop-loss order which tells the protocol to stop allocating an LP’s liquidity (and thereby forgo earning fees).
- This increased capital efficiency allows traders to reduce the risk of slippage in trade execution within the price bands that have the most provided liquidity.
In theory, this could lead to a situation where no LP wants to allocate their liquidity to the price margins, preferring to stay in the “safe” price areas.
In practice, this has not emerged as a significant issue as liquidity provision itself is highly competitive and LPs on V3 are constantly updating their positions according to price changes.
Uniswap is subject to constant competition in DeFi. On the 28th August 2020, SushiSwap forked the code in a “vampire attack” that pursued an aggressive liquidity mining strategy, attracting over US$1 billion of liquidity from Uniswap in a less than a week. Since then, Uniswap’s AMM model has been relentlessly copied and adapted by dozens of competitor DEXes and deployed on other blockchains.
Despite that, Uniswap still stands as the top DEX today. The following graph shows that as of February 2022 Uniswap still dominates the lion’s share of DEX trading volume in DeFi with Binance Smart Chain’s PancakeSwap nipping away closely at its heels.
V3’s launch in May 2021 has also been a resounding success, although trading volume on Uniswap V2 seems to persist.
However, a comparative look at the TVL levels of V2 and V3 relative to the total trading volume tells us V3 is far more efficient.
Having said that, Uniswap LPs still suffer from impermanent loss, giving DEXes like Bancor which allows the supply of single-sided liquidity (and thereby avoiding impermanent loss) more of an edge.
The future of Uniswap
On December 22, 2021, Uniswap deployed V3 live on Polygon after an overwhelmingly decisive vote, making it its fourth chain after Ethereum, Optimism and Arbitrum.
Despite being deployed on four chains, the bulk of trading still takes place on Ethereum’s mainnet, with a minority on Arbitrum and Optimism.
Despite being copied relentless by its competitors, Uniswap proves that it is still the de facto leader in the DEX space.
By constantly innovating and capitalizing on its first-mover advantage, its developers have managed to maintain their lead.
Featured Image Credit: Swissborg