Introduction: Current Status of Uniswap V4
To briefly summarize the content of the first part, it is as follows:
The core logic of Uniswap V4 is based on Flash Accounting, managing 'debt' between the pool and users.
Builders can create and choose hooks and callback contracts, making it easier to build protocols based on V4.
Simultaneously, improvements in architecture and data storage methods offer users a more cost-effective trading environment.
Especially in V4, the aim is to improve gas efficiency between swaps and liquidity operations based on Singleton architecture and Flash Accounting and to build a builder-centric Uniswap ecosystem.
However, how this will evolve and whether it can truly innovate the DeFi ecosystem still requires much discussion. Especially, there have been claims and criticisms that V4 did not present an innovative structure and merely recombined existing structures.
In this article, we will take a closer look at the controversies and situations surrounding Uniswap V4 and explore future prospects.
Controversies Around V4
Uniswap V4 copied Balancer V2 and Ambient
The Singleton architecture of V4 is not a new concept introduced in V4. In May 2021, Balancer announced V2 with a Singleton contract structure, and Ambient (prev. crocswap) adopted a similar structure for building its DEX from November 2021.
When V4 was released, some people claimed that V4 was no different from existing protocols and merely copied them, citing similarities with the two protocols. Let's verify this claim by analyzing the similarities between Balancer V2, Ambient, and Uniswap V4.
Balancer V2

Balancer V2, similar to V4, has a structure where a contract called Vault manages the token balances of all pools. In Balancer V2 pool contracts, only calculation logic operates, and the Vault contract handles the actual token balance. However, Balancer V2 differs from Uniswap V4 in two main aspects:
A separate pool contract must be deployed.
Unlike Uniswap V4, where all pool logic is centralized, Balancer V2 allows for the deployment of pools with different swap mechanisms. This offers the advantage of increased modularity but comes with the drawback of higher pool deployment costs compared to V4.
Users directly interact with the Vault contract.
In Balancer V2, users directly call methods like
swap,joinPoolin the Vault contract to perform operations like swaps and liquidity supplies. In contrast, Uniswap deploys a separate callback contract that acts as a user interface to handle user requests. This approach reduces user complexity and facilitates the building of various protocols based on Uniswap.
Balancer V2 has a structure similar to V4 in that it has a contract called Vault that manages the token balances of all pools. In the Balancer V2 pool contract, only the calculation logic operates, and the Vault contract handles the actual token balance.
However, Balancer V2 differs from Uniswap V4 in two main aspects:
A separate pool contract must be deployed.
Unlike Uniswap V4, where all pool logic is centralized, Balancer V2 allows for the deployment of pools with different swap mechanisms. This offers the advantage of increased modularity but comes with the drawback of higher pool deployment costs compared to V4.
Users directly interact with the Vault contract.
In Balancer V2, users directly call methods like
swap,joinPoolin the Vault contract to perform operations like swaps and liquidity supplies. In contrast, Uniswap deploys a separate callback contract that acts as a user interface to handle user requests. This approach reduces user complexity and facilitates the building of various protocols based on Uniswap.
Ambient (prev. CrocSwap)
Ambient also uses the Singleton architecture, storing all tokens within the CrocSwapDex contract. It also centralizes pool logic in a library, similar to Uniswap V4.
The difference between Ambient and Uniswap V4 is in user interaction. To adhere to Ethereum's contract size limits, Ambient stores actions like liquidity supply and retrieval, excluding swaps, in a sidecar contract. If a user wants to supply liquidity, they call the userCmd function in CrocSwapDex. This function then delegate-calls the userCmd function in the WarmPath contract, executing the liquidity supply and storing the result in CrocSwapDex. In contrast, Uniswap V4 processes user requests through a callback contract.
In summary, Uniswap V4, Balancer V2, and Ambient all chose the Singleton architecture to reduce resources in routing and to manage pools more easily. However, they have the following differences:
Uniswap V4 Balancer Ambient Calculation Logic Pool Library Pool Contract Library Balance Handling PoolManager Contract Vault Contract CrocSwapDex Contract User Interaction Callback Contract Vault Contract SideCar Contract (delegatecall)
From a code perspective, these structural differences become even clearer. Rather than criticizing Uniswap V4 for copying other DEXs, it's more justified to see this as the Singleton architecture being accepted as a more gas and routing efficient structure than Factory.
4-Year BSL License
Most codes in the blockchain ecosystem are open-sourced. While there are various types of open-source licenses, most projects use the MIT License or GPL, which allow commercial use, distribution, and modification.
On the other hand, BUSL (Business Source License) is a license that discloses source code and allows non-commercial use but prohibits the use of code in production or business for a certain period. Uniswap V4's codebase is designated with a 4-year BUSL license.
There was some skepticism in the community regarding Uniswap's decision to encourage builders' participation while simultaneously designating the BUSL license.
Uniswap's stance on this matter is well articulated in their blog post about V3:
We strongly believe that decentralized financial infrastructure should ultimately be free open-source software. At the same time, we believe the Uniswap community should be the first to build an ecosystem centered on the Uniswap v3 Core codebase.
Uniswap had previously lost 55% of its TVL to Sushiswap due to a fork and a vampire attack. Thus, it's speculated that Uniswap's decision to apply a license to its code from V3 onwards was to preemptively prevent vampire attacks and secure time for ecosystem development and expansion.
This licensing approach is also being utilized by other projects. Protocols like Aave V3, Compound V3, EigenLayer, and Arbitrum Nitro have applied the BSL as shown below:
The term "open source" used in Uniswap's official tweet might also be considered inappropriate. Hayden Adams acknowledged in his tweet that "Source Available" would be a more accurate term than Open Source and apologized for the oversight.
Though it seems quite long period, Uniswap respects community and the license may be changed if the community wants.
What's Next for Uniswap V4?
Uniswap V4 Router: UniswapX
Uniswap V4 inherently has a liquidity fragmentation issue. Unlike V3, which introduced fee tiers to prevent fragmentation, V4 does not offer selectable fee levels. Moreover, even if pools have identical configurations, they are recognized as different pools if they possess different hooks, leading to the potential existence of various pools.
In the given scenario, which pool would provide a better swap result for a user making a swap request: Pool A with a 0.4% fee and a hook that returns MEV profits, or Pool B with dynamic fees based on volatility?
In V3, Uniswap utilized its internally developed Smart Order Router to find the most efficient swap path. However, V4 presents a more complex environment where a single Router might not easily calculate all swap paths. This is due to the need to consider liquidity, fees, and the results of interactions due to hooks for each pool. Additionally, as the types of pools increase, new hook addresses must be manually integrated into the Router, requiring continuous management and increasing the likelihood of inefficient routing.
To address this, Uniswap announced UniswapX in July at EthCC. UniswapX is a Dutch auction-based swap aggregator and is central to Uniswap V4 Routing.

UniswapX outsources the role previously performed by V3's Smart Order Router to an open network composed of 'Fillers'. The detailed routing process is as follows:
A user (Swapper) wishing to swap decides their intent (which token to swap, how much, and into what output token) using a Permit2 signature. This intent includes the minimum amount of the output token and a swap deadline.
Fillers, composed of MEV searchers, market makers, etc., have the authority to process the swap within the bounds of this signed intent. For instance, if Alice wants to swap 1 ETH for 2000 USDC with a minimum output of 1995 USDC, Filler Bob can execute this at 1 ETH ↔ 1999 USDC on Uniswap V3, send Alice 1995 USDC, and profit 4 USDC.
However, if another Filler, Charlie, offers to process the order for 1996 USDC, taking only a 3 USDC profit, Charlie's offer is chosen, and Bob misses out on the profit. This system uses a 'Dutch Order' method where the Filler offering the most favorable terms to the Swapper is selected.
The chosen Filler sends the Permit2 signature to the Reactor contract to initiate the transaction. The Reactor contract calls the Filler's Executor contract to execute the swap and then verifies that the transaction conditions have been met.
Essentially, UniswapX processes user intents in an RFQ (Request for Quotation) format, operating as a permissionless network. Compared to the traditional Smart Order Router, this offers:
Improved Swap Efficiency through Incentive Structures: Fillers are incentivized to find the most efficient swap paths since they earn more by offering better rates to users.
Easier Routing Integration: In a V4 environment with a single Router, integrating a new hook would be cumbersome. With UniswapX, integration is more straightforward as Fillers can easily integrate new hooks, incentivized by potential exclusive profit opportunities.
However, challenges remain:
In essence, UniswapX operates as a permissionless network that processes user intentions in the form of RFQ. Compared to the traditional Smart Order Router, this approach offers several advantages:
Enhanced Swap Efficiency through Incentive Structures:
Fillers, by offering more competitive swap rates, can earn higher profits. This means they are incentivized to find pools that maximize the output tokens for users. If a swap becomes inefficient, the Filler bears the cost, ensuring they always seek the most efficient swap routes.
Simplified Routing Integration
Imagine a scenario in V4 where a single Router handles all swap requests. If Alice creates a pool with a new hook and wants to integrate it into the Router, she would have to:
Notify Uniswap about the new hook and request integration.
Uniswap would then audit the hook to ensure it doesn't perform malicious actions and integrate it into the Router.
If there are tens of thousands of users like Alice, it becomes nearly impossible for Uniswap to handle all integration requests.
However, with UniswapX, integrating a new hook is relatively straightforward. Alice simply needs to approach one of the Fillers and request them to integrate her hook and pool. From the Filler's perspective, integrating new hooks can provide exclusive profit opportunities, making them more inclined to do so. This decentralizes what a centralized Router would typically handle, distributing the responsibility to Fillers based on incentives.
Yet, UniswapX still faces several challenges:
Centralization of Fillers:
Given the system's design, Fillers who can quickly identify efficient swap routes and have significant computing resources are more likely to handle user swap requests. If certain entities dominate this role due to superior algorithms and resources, they could potentially handle most user requests. Since the UniswapX protocol is based on off-chain processes, centralization of Fillers could lead to issues like collusion. This is closely related to the EOF problem discussed below.
Exclusive Order Flow (EOF) Problem
As mentioned in the UniswapX whitepaper, Fillers play a role similar to MEV-Boost's searchers, identifying profit opportunities between user transaction requests. If Fillers in UniswapX collude with MEV-Boost builders to form a monopolistic order flow (EOF), considering Uniswap's dominance in Ethereum DEX trading volume, it could accelerate builder centralization and increase risks to the Ethereum network.
On a positive note, UniswapX's design resembles Flashbot's SUAVE. SUAVE (Single Unified Auction for Value Expression) aims to address builder centralization by promoting free competition in the MEV market based on user preferences. The concepts in SUAVE are very similar to what's implemented in UniswapX. In the future, UniswapX could be an ideal application for decentralized block builders once SUAVE is implemented. Dan Robinson from Paradigm, a member of the UniswapX development team, mentioned that they will continue efforts to decentralize Fillers and Order Flow in UniswapX. Solutions like privacy protection for Permit2 signatures will be essential to prevent collusion without compromising system efficiency.
In conclusion, UniswapX, as a Dutch Order-based aggregator, was introduced to assist with efficient routing in Uniswap V4, which faces significant liquidity fragmentation issues. However, it's still a work in progress, with challenges like Filler centralization and the EOF problem requiring further development and attention.
On a side note, UniswapX has faced criticism for its similarities to platforms like CoWswap and 1inch. While there are structural and functional resemblances, one of the primary reasons for Uniswap's development of UniswapX was to address V4's routing challenges. The inevitable liquidity fragmentation issues arising from V4's introduction are addressed by UniswapX's decentralized network of Fillers. Therefore, it's more appropriate to view UniswapX not just as a simple aggregator but as a solution tailored to address V4's specific challenges.
Increased Complexity in Liquidity Provision
While UniswapX is a protocol that assists traders in making swaps more easily, it doesn't necessarily aid liquidity providers (LPs).
Managing liquidity in a concentrated environment is not straightforward. This was evident in V3. The graph below illustrates the average daily returns based on a 5% CVaR for four pools within Uniswap V3. The 5% CVaR (Conditional Value at Risk) represents the expected average loss when losses exceed 5%, a metric frequently used to measure risk.

The paper points out that less than 30% of liquidity positions within these pools are being compensated for volatility risk, based on the graph. It also suggests that without deep expertise and active position management, individual LPs might find it challenging to reap significant profits from V3 liquidity provision. This implies that the effort required for LPs to earn meaningful returns in concentrated liquidity might be relatively higher compared to other DEXs.
In V4, the considerations for LPs have increased. Not only do they have to consider the pool's fees and range, but the type of hook a pool uses has also become a crucial factor. Therefore, LPs in V4 need to meticulously review the functions of the hooks associated with the pools where they provide liquidity.
From this perspective, the roles of Uniswap-based liquidity management protocols like Arrakis Finance, Gamma, and Bunni could become more significant. If these protocols launch integrated liquidity management solutions that evaluate hooks around the V4 launch time, individual LPs might find it more beneficial in terms of profits and time management to utilize these solutions rather than supplying liquidity based on their research.
Currently, according to Defillama, the TVL of these protocols totals over $300M, accounting for about 12% of Uniswap V3's TVL. Observing the trends of these liquidity management protocols and the resulting TVL changes around the V4 launch could be an interesting perspective.
Diversification of Hooks and Competition
One of the most notable components in Uniswap V4 is the hook. Pool owners can connect hooks to add a much wider range of functionalities to their pools, potentially leading to increased profits for traders and LPs or enhanced user experiences.
Moreover, hooks have HookSwapFee and HookWithdrawFee, allowing them to collect fees from users. This could incentivize various developers or companies to develop high-performing hooks and compete to attract users and monopolize fees.
Diversification of Hooks
What kinds of hooks might exist? One of the most intriguing is the LVR hook.
The previously cited paper points out that LP profits are suboptimal. One of the reasons identified is LVR (Loss-versus-Rebalancing). LVR refers to the cost arising from the price difference between assets in an AMM and the external market price. Price discrepancies offer arbitrage opportunities for traders. When arbitrage occurs, the value of assets deposited by LPs decreases, resulting in a loss for LPs. Essentially, LVR represents the loss LPs experience compared to an ideal situation where the AMM's internal asset price instantly matches the external market price.
This discrepancy arises because the AMM's price cannot instantly match the external market price. In traditional stock markets, settlement occurs immediately after a trade, allowing market makers to adjust prices instantly. However, in AMMs, there's a delay of at least one block for the transaction settlement.
So, how can the AMM's price align with the external market? According to a 2022 paper titled ‘AMM Minimizing Loss-Versus-Rebalancing’, the Diamond protocol can minimize LVR, preserving LP profits. The Diamond protocol operates by partially returning the profits from arbitrage trades back to the pool.
The paper proves that pools based on the Diamond protocol can earn up to
\((1-\beta) * LVR\)more than current CFMM-based pools.
Currently, there are attempts to implement this Diamond pool in Uniswap V4 using hooks. This approach distinguishes between the first trade of a specific block and other trades using the
beforeSwapandafterSwaphooks. It then goes through a series of processes, capturing collateral through a hedger contract and aligning the pool's price with the external market through a vault contract, to return some of the LVR profits to the pool, thereby increasing LP profits. More details can be found in the related ethresearch post.Besides hooks that prevent MEV and minimize LP losses, other hooks could be developed, such as the Out-Of-Range hook, which deposits liquidity into a lending pool to provide additional profits to LPs when the price moves out of a predefined range.
From a trader's perspective, as seen in the previous text, hooks like limit order hooks, Stop Loss hooks, and KYC hooks that allow RWA trading can provide a better user experience by introducing functionalities that were previously unavailable in Uniswap.
Hook War: Which Hook Ultimately Wins the Competition?
There could be competition among developers to create hooks, driven by the potential to earn fees from those hooks.
To attract significant trading volume and consequently more hook fees, a pool must be selected as a better pool by UniswapX's Filler. It's not just about the hook itself; it's crucial to determine who offers the most advantageous swap when considering the hook algorithm, hook fees, and pool fees.
Assuming all LPs act rationally, liquidity will gravitate towards pools with hooks that offer the highest returns to LPs, i.e., pools with high APRs. The LVR hook mentioned earlier can serve as an example. If this happens, there's a high likelihood that UniswapX's Filler will execute swaps through that pool because deeper liquidity reduces the price impact of trades. As a result, most trades will occur in that pool, and the hook developer can collect a significant amount of
HookSwapFee.In the end, it can be anticipated that the hook offering the most benefits to LPs will attract the most liquidity. For instance, suppose Alice successfully develops a good hook and attaches it to the WETH-USDC pool. As of the second week of August, the 7-day trading volume for the WETH-USDC pool (with a 0.05% fee) in Uniswap V3 is $690.37M. Even if Alice sets the hook fee at just 0.01%, she could earn around $280K in revenue every month. As the launch of Uniswap V4 becomes more imminent, the competition to develop effective hooks is expected to intensify.
For more information on hooks and its implementation, check the awesome-uniswap-hooks by Suning Yao.
Conclusion
Uniswap V4 has not been officially released yet and remains an incomplete protocol. For V4 to achieve its objectives, the following issues need to be addressed:
Implementation of Transient Storage (EIP-1153)
Standardization of callback contracts
Decentralization of UniswapX
Diversification of hooks and mechanisms to filter out malicious hooks
Community consensus related to licenses and other matters
However, if these challenges are effectively addressed, Uniswap V4 has the potential to serve as a DEX infrastructure with its unique ecosystem, offering better profits or experiences to LPs, traders, and builders than before. It will be interesting to observe how Uniswap, one of the major players in the DeFi ecosystem, addresses these challenges with its new product, V4, and how it delivers value to its users.
Reference





Cool. Question: Can a protocol act as a filler for its own liquidity pool?