AL #011: How to Compete With Uniswap V4
What Uniswap becoming an AMM-aggregator means for the rest of us.
Thanks to Moody Salem from Ekubo for explaining some of the potential implications of this new architecture.
Uniswap V4 has been announced and is now being built in public.
While the new version supports a lot of additional features, the introduction of hooks in particular is significant, making it much more difficult for other AMMs to compete with Uniswap V4.
AMM = Curve + Flow + Liquidity
When building a new AMM, there are 3 things you should care about:
The curve (the trading function your market maker is built around)
Flow (how users find your AMM and the volume of trading activity)
Liquidity (how liquidity providers find your AMM and the amount of liquidity provided).
You can think of trading flow and provided liquidity as starting to move the flywheel and an efficient curve as helping to accelerating the flywheel.
For example, trading flow comes from integrations with aggregators. Getting integrated is the first step but an efficient curve allows you to price more competitively and win more swaps.
Uniswap V4 is a Substantial Improvement
When looking through this lens, it’s clear that the success of an AMM comes in significant part from off-chain activity (implementing integrations and partnerships to drive flow & liquidity), however, Uniswap V4 brings a lot of improvements also on the protocol level.
For example, flash accounting and native ETH implementation makes trades cheaper, which should bring more flow. Hooks can also modify swap fees or provide additional benefits to traders.
Uniswap is now an AMM Aggregator
Perhaps the biggest change, however, is that Uniswap has now become an AMM aggregator.
Hooks allow developers to deploy custom pools by providing the address of a hooks contract.
This is where it gets interesting. What are the benefits of building a hooks contract and why would a third-party developer contribute to Uniswap V4's ecosystem?
The main attraction is ease of development. It’s now feasible to implement a production-grade AMM in a hackathon. Uniswap V4 already implements a highly gas-efficient contract and hooks can work on tailoring the curve or implementing other features like rewards, oracles, more complex liquidity provision, etc.
Developers can still monetize their pools as hooks allow introducing a fee share.
Third, there may actually be significant benefits on the flow aggregation side. If aggregators decide to whitelist hook-based pools, building your AMM with hooks can provide immediate access to trading volume. Moreover, because of Uniswap's singleton design, your trades will more likely be combined with other Uniswap V4 trades for maximum gas efficiency.
The same can not be said for liquidity provision. Hooks can have features that permanently freeze liquidity and therefore AMM developers building on Uniswap will likely have to build that side of the market directly.
The idea of AMM aggregation is not new, one example being Sushi’s Trident project. Balancer also supports custom pools.
Uniswap V4 may be the first time it's done with the right balance of flexibility and aggregation benefits.
Another AMM aggregator to follow is Ekubo. By virtue of being built on Starknet, it will be less constrained by gas concerns compared to Uniswap V4 and I expect will push the design space even further.
As an AMM developer, you may wonder – how do you compete in the era of AMM aggregators?
1. Consider the whitespace
It's become much less compelling to build a market maker with a product curve of xy = k, however, Uniswap still has several blind spots. Three examples:
Uniswap curves are not intrinsically dynamic even when prices change (this makes it difficult to be a liquidity provider)
Hooks cannot be used to directly implement more complex curves like stable swap or linear pools
Liquidity providers are vulnerable to poor hooks implementations.
Another option could be to re-assess the new Uniswap stack and build what’s missing.
For example, when Uniswap V3 emerged, Arrakis were able to develop a protocol for automated liquidity provision on Uniswap. This was a new category that simply didn't exist before.
With V4, we could benefit from having more tooling to find “good” hook-based pools and separate them from “bad” hook-based pools. This type of meta-aggregator could focus on analyzing audits of Uniswap custom pools and building tools to price trades with them more efficiently.
2. Decide how you will play
If you’re building a pure AMM, you have 3 choices:
First, you could ignore Uniswap V4 and build a competing AMM or AMM aggregator, maintaining more control over your ecosystem.
Second, you could directly build on Uniswap V4, benefiting from flow aggregation and the pre-existing codebase of Uniswap.
Third, you could have a hybrid model, planning to launch via Uniswap V4 first in order to attract liquidity providers but then building your own protocol to take it in a different direction.
Just know that if you ignore Uniswap V4 you will have to compete with companies who build on top of it.
3. Have a plan for your curve, flow & liquidity
Whichever option you’ll pick, you’ll need a good curve and a differentiated plan to drive flow & liquidity to your protocol.
While relying on Uniswap V4 for some of these in the short-term is an option, in the long-run it’s better to be opinionated and have an independent brand in the market.
It’s also worth noting that Uniswap's liquidity moat is not insurmountable. One way to compete is to deploy in markets where they don't have a strong presence (such as new L2s or by building cross-chain AMMs). Another option is to couple your AMM with other protocols or features (e.g., intents) as part of an integrated offering.
4. Expect more fragmentation
Since it's now significantly easier to deploy an AMM that shares some of its logic with Uniswap, the market will become more dynamic and fragmented.
If your protocol can be implemented with hooks it most likely will.
Expect there to be fierce competition with liquidity providers becoming more discerning. I also expect some of them to build their own hooks.
To conclude, Uniswap V4's feature set is much more powerful than it looks on the outset and has forced a decision from everyone building an AMM – join the mothership or fight against it.