It’s time to clear the fog surrounding such an important defi primitive.
What is Uniswap?
Uniswap is a decentralized exchange (which we’ll refer to as a dex). A peer-to-peer system created to swap tokens (ERC20) on the Ethereum blockchain using smart contracts to emphasize censorship resistance, self-custody, and to function without any trusted intermediaries who may be regulated. These smart contracts are non-upgradable, set in stone the moment they’re deployed. So it will run in perpetuity as long as Ethereum is up and running.1
The main question here is how can this stack up to a centralized exchange (which we’ll refer to as a cex)?
Market Making Structure and Costs
Most cexs use an order book based exchange, where buyers and sellers create orders organized by price level that are progressively filled as demand shifts. This means when you place an order, it has to be filled for a trade to be successfully executed . Uniswap uses the Automated Market Maker (AMM) instead.
In an AMM the buyer or seller trades directly with a pool consisting of two tokens relatively priced to each other. As they’re traded for one another, they dynamically find new market rates respectively. Due to this dynamic and concurrent fluctuations in pool liquidity from trades, dex traders face price impact much like cex traders would in an order book. In addition to this, dex traders also experience slippage which is due to the nature of the Ethereum blockchain and the transaction needing to be confirmed on-chain.
Altogether, this sounds expensive right?
Generally speaking, gas cost, slippage and fees are negligible compared to the associated cost with price impact. Regardless, dexs still win out; particularly for large order sizes. This is due to deeper liquidity and higher market depth across all price levels. Market depth is needed to make an exchange competitive. It is critical to supporting high transaction volumes and reliable execution. That said, the typical price impact on Uniswap V3 is 0.5% and 1% on coinbase.2
Along with pioneering this new paradigm of enabling trades, Uniswap has also created an environment for coins to be traded which have low liquidity, a small market, or ones which don’t need to be traded very often. This is due to the nature of the AMM having liquidity available at the price level without needing a counter party. It is particularly advantageous when thinking about stable swaps or extremely small cap coins.
Liquidity Pools
Dexs expand the participation of traders, allowing liquidity providers to vote with their money on the pairs that they desire to be consistently traded with low fees at dependable prices.3 Liquidity providers earn trading fees from traders proportional to their capital committed to the pool. This lets them revenue share with the protocol, which opens up the activity of market making to a much wider array of participants, and attracts more capital with a potentially greater risk appetite than the traditional agents.
This begs the question of how the little guy is going to get screwed now that this type of market participation has been made available.
There are serious risks associated with liquidity provision including, most notably, impermanent loss. Impermanent loss occurs when one asset is more volatile than the other, leading to a situation that must be arbitraged to regain the desired 50/50 ratio of liquidity pools. This can ultimately lead the provider to losing money.4
Fortunately, a provider can still profit if impermanent loss is less than the collected fees. The above chart is realized by plotting growth rates of LP tokens compared to holding a single asset, and it is clear that there is a bound on where the provider stays in profit. Let's not think negatively though, 100% increase in any asset is a lot and not something that happens on a daily basis unless you're a degen shit coin trader. Even in the worst setting of pure arbitrage trade where LPs should lose out on every trade made, there is still potential to earn from volatility harvesting and actually do better than HODLers over time.5
Additionally, since arbitrage is the main mechanism to realize the real price of an asset on the dex, the incentive is present for arbitragers to always take the trade. This essentially generates guaranteed fees for liquidity provides offsetting the potential for experiencing impermanent loss and not being compensated in fees.
Uniswap V3 is the latest version of uniswap.
The most notable upgrade is termed concentrated liquidity. Instead of having liquidity distributed uniformly along the price curve from 0 to infinity, liquidity providers can now create positions where they can target a specific price range. This allows for deeper liquidity in specific price ranges and aides capital efficiency.
In this fashion, the liquidity provider earns more fees than traditionally when price is within the range of their position, but fails to earn any fees when the price is not within the range. In the case that the liquidity provider stops earning fees they are also relinquished to the asset that was sold off into the pool most. Once price does move back in the range, however, their position once again becomes active.
Along with the ability to select ranges for a position, liquidity providers can also select between multiple pools for each token pair with different swapping fees, 0.05%, 0.30% and 1% respectively, which aides capital efficiency.
With these new capabilities available to liquidity providers, they can create customizable liquidity positions as well as single-sided asset provisions. By doing this one can approximate limit (range) orders in the form of buy limit orders and take-profit orders. This is a major update for AMMs something traditionally only done in order book style exchanges.6 This allows the user to take advantage of concentrated liquidity much like one would traditionally consider using options to enter or exit positions when they are unsure of a price target.7
Keep in mind that while Uniswap V3 is the latest version of Uniswap, Uniswap V2 is still fully operational. Therefore, market participants can actively choose whether to take the role of an infinite range liquidity provider or a finite range liquidity provider, opening up the options of market making, asset allocation, and yield farming strategies.
Liquidity pools also serve as price oracles, which allow access to historical price and liquidity data on the pair. This really expands uniswaps purpose towards being a defi primitive, making it a source for decentralized applications to be able to draw reliable data from and continue the expansion of defi ecosystems as well as innovation.
For Market Participants
One sticking point I must acknowledge here is that to use Uniswap you must be on chain. Perhaps there will come a time when you are using Uniswap on the back end easily with little barriers to entry, but as of right now there is still the need to onramp money to some sort of wallet like a MetaMask in order to interact with the protocol. This may be a downside to some, but to me it is just an indication that there is continued growth in potential users and innovation in store for Uniswap as more people come into the crypto space.
In addition to this, Uniswap is permissionless and immutable by design. Making financial services more accessible for any one in the world, and eliminating much counterparty risk.
This is a big departure from traditional financial services where there are many restrictions for participants, notably in the United States, in regards to accessing cryptocurrency markets. As well as many failure points in the cex business model such as the ability to halt trading and manipulate market behavior without making such knowledge public immediately.
This is a Defi primitive. Much more than just a regular exchange this is a platform for decentralized commerce where people can come to swap for tokens ranging from blue chip cryptocurrencies to degen dog coins. Furthermore, there are some other interesting recent developments such as GMX, GNS, DYDX, PERP, CrocSwap, etc. whose purpose more fit trading rather than swapping.
Discussion
The nature of Uniswap as a dex, is primarily to swap tokens in a peer to peer manner. This is facilitated by liquidity pools which traders can participate in and revenue share with the protocol. There are costs associated with bringing cash on chain in the form of cryptocurrency as well as price impact and slippage, but overall swap fees are low. It seems to be incorrect to compare Uniswap with centralized exchanges that facilitate spot trading, margin trading and a wide suite of other products. Rather, Uniswap is more comparable to something like Coinbase where users can swap for their tokens in a simple manner (although Coinbase fees themselves are quite high). Liquidity providers act as market makers, but do so untraditionally absorbing more risk. Uniswap itself is a decentralized finance primitive with impressive features that serve to aid the future of innovation in defi products.
It is difficult to say whether Uniswap will ever outcompete cexs, but there is certainly room for coexistence. Cexs have robust business models with teams of highly skilled people working on them every day, whereas Uniswap is permissionless and open source. However, I do believe there is a promising future ahead of Uniswap. Most likely they will continue to deepen their moat as a defi primitive through updates, integration to dapps and other L1s, as well as simply acquiring market share from new users entering the space. The AMM itself is an interesting method of exchange and Uniswap has done an outstanding job pioneering it alongside ensuring that decentralization maintains a key factor.
https://uniswap.org/blog/uniswap-v3-dominance
https://arxiv.org/pdf/1911.03380.pdf
https://pintail.medium.com/understanding-uniswap-returns-cc593f3499ef
https://research.paradigm.xyz/uniswaps-alchemy
https://www.investopedia.com/options-basics-tutorial-4583012