How should we imagine Uniswap v4?

What should be our vision for Uniswap v4?

Author: A51 Finance Translation: Shanooba, LianGuai

There have been many articles about Uniswap v4 and how it will revolutionize the DeFi space, but only a few articles are meant to guide developers on how to prepare for its release. It can be difficult for anyone looking to create something on Uniswap to understand where to start. The information is fragmented and not easily accessible.

This article aims to address this issue. We will go into detail about each concept in Uniswap v4 so that you can position yourself in the best possible way when it is finally released.

Imagine the contrast between Uniswap v4 and v3

Uniswap Labs wants Uniswap v4 to be a platform for AMMs, which means that Uniswap v4 is no longer just an AMM, but a platform for building AMMs. In an interview with Bankless, Hayden Adams compared Uniswap v4 to Ethereum and its aggregated roadmap.

Uniswap is evolving in a similar direction, using hooks instead of rollups. Just like Ethereum, Uniswap Labs also intends to keep the underlying protocol simple, without any complexity, and push all innovations to the edges, meaning the hooks. Hooks will be where all the innovation happens. One of the reasons for doing this is that the way Uniswap v3 works is quite rigid, but Uniswap v4 is just a neutral space for liquidity innovation, used to build rigid AMMs. This could greatly stimulate innovation in the AMM space.

This reminds me of an article Vitalik wrote about the end game of blockchain design, where he believes that all blockchains will eventually converge to similar designs, whether they are L2-centric chains or holistic chains. This seems to be the end game for Uniswap v4, and v5 might take Uniswap to application chains.

What does it mean when Uniswap v4 is “no longer just an AMM”?

This means that Uniswap v4 is not only an asset exchange platform, but also a platform where developers can build their own customized AMMs.

Since forking incentives no longer exist, what will happen to other AMMs?

Many AMMs are forks of Uniswap v2 or v3, and on chains where Uniswap has already taken dominance, they will face a difficult period in the future. They might also have to start building on Uniswap v4. Apart from that, most of the innovation in AMMs revolves around LP fees, but with Uniswap v4 now allowing you to do all these operations within its ecosystem and due to the massive network effects of the Uniswap ecosystem, these AMMs might no longer be as profitable.

Imagining pools in v4 and v3

Pools have very different meanings in v4 and v3. In the early versions of Uniswap, all liquidity resided in pools, with each pool being a separate contract. In v4, all liquidity exists in a singleton contract, and pools are just wrappers for all the customizability you do with hooks.

Anyone can use their own custom hooks to initialize their pool, meaning that in reality, there may be hundreds or even thousands of pools for a pair of tokens.

How liquidity works between singleton contracts and pools

All assets in the pools themselves reside in a single contract, but are managed by the pool. The pool is where price ratios are set, hooks are attached, and trades are made.

Should we be concerned about all the liquidity in a single contract?

Absolutely not. Singleton architecture has been tried in the past and has worked well. Balancer has always been a supporter of singleton architecture. It has a huge advantage over factory architecture in terms of gas efficiency. If someone is worried that potential vulnerabilities in the singleton contract could put all assets at risk, they should also realize that factory architecture is no better, as vulnerabilities in the factory contract would mean that the same piece of code is replicated in all deployed contracts, meaning that all contracts now have that vulnerability.

What can be built on Uniswap v4

In the context of Automated Market Makers (AMMs), Uniswap v4 introduces hooks and a more platform-centric approach, allowing for highly specialized and innovative AMMs to be created. Here are some specific possibilities:

Custom fee structures: Developers can create AMMs with unique dynamic fee models that can be adjusted based on market conditions, trading volume, or even time of day to optimize returns for liquidity providers and trading costs for traders.

Dynamic liquidity allocation: AMMs on Uniswap v4 can automatically adjust liquidity for different price ranges based on algorithms, maximizing capital efficiency and potentially reducing impermanent loss.

Concentrated liquidity positions: While Uniswap v3 introduced concentrated liquidity, v4 can allow for finer control over liquidity positions, enabling developers to create AMMs tailored to specific niche markets or strategies.

LP strategy hooks: AMMs can be designed to allow LPs to implement custom liquidity strategies, such as automatic rebalancing, yield optimization, or integration with other DeFi protocols for additional earnings.

Slippage protection mechanism: AMMs on Uniswap v4 can include advanced slippage protection, using hooks to integrate with oracles or other data sources and dynamically adjust pool parameters in real-time to protect users from front-running or price manipulation.

Cross-protocol AMM: By leveraging hooks, developers can create AMMs that work across different protocols, enabling liquidity sharing and increased market-depth.

Token-specific AMM: AMMs can be customized for specific types of tokens, such as stablecoins, governance tokens, or utility tokens, optimizing trading functions for these specific token characteristics.

Risk-adjusted AMM: AMMs can adjust fees or liquidity depths based on the risk profile of the traded assets, potentially attracting different categories of investors.

AMM with integrated insurance: Hooks can create AMMs with integrated insurance mechanisms, providing protection against risks such as smart contract risks or other DeFi-related risks (such as impermanent loss or LVR).

Social trading AMM: AMMs can be created where liquidity providers follow the strategies of successful traders or pools, automatically adjusting their liquidity supply to reflect successful patterns.

Pool with governance functionality: Developers can build AMMs with specific pool governance functionality, opening up another frontier for community collaboration.

By providing a neutral platform for liquidity provision and trading, Uniswap v4 allows developers to innovate in the AMM space, creating professional and potentially more efficient markets.

Uniswap v4 Hooks is a great list website to showcase the content that has been built so far.

Issues with routing and pool discovery in Uniswap v4

Due to Uniswap v3’s factory pool deployment architecture, it offers limited pool variants based on fee tiers (0.01%, 0.05%, 0.3%, 1%). Once a pool is created, it cannot be recreated with the same fee tier, meaning each pair allows for a maximum of 4 types of pools. As a result, Uniswap’s exchange router only resolves trades for pools within these tiers.

By introducing singleton architecture and pool creation with integrated hooks, there can be infinite combinations of pool positions and hooks, which is great as anyone can create their own version of the pool with a set of custom logic to facilitate liquidity provision and trading. While this customization opens doors to innovation, it also creates a decision vacuum for the Uniswap or Uniswap X exchange router. Here are some pool discovery issues that pool creators will face.

  1. Position discovery: Uniswap X exchange router requires fillers to provide the best trade quotes from anywhere, regardless of whether the trade is on Uniswap. The creator of a single pool position must create enough liquidity depth in that position to catch the attention of fillers.

  2. Hook execution dependencies: Trade fillers are selective, so only selective positions will be used to fill trades, meaning hooks attached to other positions that are not selected will be idle. For example, if a pool position attaches a limit order hook, there needs to trigger a Swap event after it to actually know the price changes, resulting in inefficiency for the user in that position.

  3. Swap interface: In v3, strategy builders and pool creators didn’t worry about having to ask their community to trade from a specific tier or build their own swap interfaces since the choices were limited and discovery was easier. In v4, they will have to advertise their position and may have to build their own mini swap front-end to keep trades flowing through their positions. The limitation of this approach is that they won’t initially gain trading volume via hooks from most users who land on the Uniswap front-end.

Conclusion

In conclusion, Uniswap is heading towards another unknown territory of liquidity and trading experience, which will ultimately evolve into a native liquidity layer where many liquidity and currency markets will be built upon. Modular AMMs will become the new norm. However, the transition still needs to address some potential vacuums, namely the fair allocation of trading priority among almost thousands of unique positions with custom hooks and the user experience, as its predecessor v3 poses fundamental issues with LP profitability due to the bleeding impermanent loss caused by volatility.

We will continue to update Blocking; if you have any questions or suggestions, please contact us!

Share:

Was this article helpful?

93 out of 132 found this helpful

Discover more

Market

BNB Chain’s Roadmap for 2024: What Changes Can We Expect?

Exciting progress is on the horizon for the BNB Beacon Chain Fusion as it nears completion within the next six months...

Blockchain

Worldcoin’s New Orb Promises a Friendlier Look

Exciting New Update Worldcoin is stepping up with plans to release upgraded versions of its highly efficient eyeball-...

Market

NuggetRush: The Golden Game of Altcoins

As the world of cryptocurrencies continues to grow, there is growing speculation about the rise of alternative coins,...

Bitcoin

MicroStrategy’s Bitcoin Bonanza: Making Tons of Dough in the Digital Gold Rush

Fashionista, get the scoop on MicroStrategy Inc's (NASDAQ MSTR) latest Bitcoin (BTC) spending, straight from founder ...

Bitcoin

Four Key Factors Driving Bitcoin Price Rally, According to Matrixport 🚀💰

Matrixport utilizes a comprehensive approach to predict Bitcoin prices, taking into consideration significant factors...

Market

SEC might postpone approval of spot Bitcoin ETF as it reviews comments on newly submitted S-1 forms.

There is currently a disagreement among observers regarding the SEC's decision to add comments on S-1 forms, which ha...