Final Battle between DEX and CEX? Uniswap V4 Remakes Liquidity Growth Flywheel

Uniswap V4 may revolutionize the liquidity growth model with a potential showdown between DEX and CEX.

On June 13th, Uniswap released the Uniswap V4 version code draft, causing a stir in the industry, with many believing it to be one of the few important innovations in the current bear market, and potentially triggering the final battle between DEX and CEX.

It is widely believed that at a time when the world’s largest CEX, Binance, is being investigated and prosecuted by the US SEC, the release of this version by Uniswap, the world’s largest DEX, will not only continue to strengthen Uniswap’s leading position in the DEX market, but will also have a broad and far-reaching impact on the industry’s competitive landscape and future development.

In Uniswap’s “Our Vision for Uniswap V4” and “Uniswap V4 Core WhiteBlockingper” documents, a new liquidity implementation framework and innovative mechanism are described, focusing on Hooks and Singleton. To sum it up, “Hooks sing, Singleton builds the stage, opening up liquidity innovation space, reducing costs, increasing efficiency, improving the experience, Uniswap V4 will restart the liquidity growth flywheel.”

01 Hooks: developer-defined liquidity pools become the main innovation

What are Hooks?

Hooks are essentially external contracts created and defined by developers to define transaction logic. With Hooks, developers can call external contracts to perform specific operations at specific points in the life cycle of the liquidity pool (such as adding, adjusting, deleting, and exchanging), such as creating limit orders before trading, adjusting transaction fee levels after changes in liquidity pool positions, etc.

Currently, Uniswap V4 supports Hooks calls at 8 specific points:

● beforeInitialize/afterInitialize

● beforeModifyPosition/afterModifyPosition

● beforeSwap/afterSwap

● beforeDonate/afterDonate

Developers can create hook contracts for custom transaction logic at these points to achieve AMM innovation. For example, a limit price can be set before trading begins, and then checked after trading ends to determine whether the limit price is met (True) or not (False), as shown in Figure 1-1.

Figure 1-1 Hook transaction process diagram (image from the Uniswap official website)

Hooks can modify pool parameters, add new features, and improve liquidity pool performance. To demonstrate the capabilities of Hooks, Uniswap provides some sample hooks:

Time-Weighted Average Market Maker (TWAMM): Splitting the execution of large orders over a period of time to reduce slippage and make trading smoother.

Dynamic Fees Based on Volatility or Other Inputs : Adjusts trading fees dynamically based on market volatility, providing a more flexible and adaptive fee mechanism;

On-Chain Limit Orders : Automatically executes on-chain limit orders when specific price conditions are met;

Depositing Liquidity Beyond Range into Lending Agreements : Deposits liquidity beyond range, that is, idle liquidity, into lending agreements to provide liquidity, improve capital utilization efficiency, and increase revenue sources;

Customized On-Chain Oracle : Implements customized oracles such as median, truncated, or geometric mean oracles;

Internally Distributed MEV Profits Back to LPs : Internalizes miner-extractable value (MEV) profits for liquidity providers.

Of course, Uniswap hopes that more innovations will be implemented by developers. Previously, everyone depended on the UNI team to iterate on the Uniswap protocol, which constrained the update speed. Now, based on the liquidity and security of the Uniswap protocol, these hooks allow developers to create more flexible and customized liquidity pools.

The initiative has been handed over to the developers, who will become the main innovators of liquidity pools. Just as there are a thousand Hamlets and magic wands in a thousand people, and just like in the chatGPT open plugin market, the “battle of a hundred hooks” is about to begin, which will undoubtedly accelerate the innovation speed and open up the innovation space of liquidity pools.

02 Singleton: Establishing Singleton Liquidity Pools to Promote Trading Cost Reduction and Efficiency Improvement

Regarding liquidity pool architecture, V4 removed the Factory/Pool model of V3 and replaced it with a large contract framework, namely the Singleton contract. The comparison between the two modes is shown in Figure 2-1.

Figure 2-1 V3 Factory/Pool Mode vs V4 Singleton Mode (Image from Uniswap official website)

The Factory/Pool model has one contract per liquidity pool and belongs to the multi-token multi-contract architecture. Its disadvantage is that deploying a new pool requires deploying a new contract, whose cost varies with bytecode size, and multi-pool trading requires crossing multiple contracts, resulting in high cost and low efficiency.

Uniswap V4 adopts the Singleton design pattern, in which all liquidity pools are managed by one contract, reducing the cost of deploying liquidity pools by 99% and making multi-hop trading more convenient and efficient.

Arbitrage trading is a common strategy in cryptocurrency trading that allows users to convert from one cryptocurrency to another through a series of token pairs.

All trading pairs in V4 are placed in a single large contract, so when users perform arbitrage trades, they only need to call the contract once to complete all exchanges. This greatly improves trading efficiency, reduces gas fees, and is particularly friendly to fee-sensitive users, which helps encourage them to increase their trading frequency.

03 Flash Accounting: Cost optimization implemented in combination with EIP-1153

Flash Accounting is a new method of accounting introduced on the singleton contract architecture.

In versions V3 and earlier, all assets involved in each transaction had to be transferred in/out of the liquidity pool during the exchange process, which undoubtedly complicated the process and produced more gas fees.

In V4, “Flash Accounting” is based on net balances for transfer. This accounting method allows for any number of tokens to be lent in/out inside or outside the singleton contract during the transaction process, but all borrowed tokens must be repaid when the transaction is completed, and the net balance of the tokens should be transferred out of the pool after the exchange is completed. Obviously, this accounting method simplifies complex pool operations, such as atomic swaps and liquidity addition, and also simplifies multi-hop transactions when combined with the singleton mode.

However, it should be noted that in the current execution environment, because storage updates are required every time a balance change occurs, the accounting cost is high. But using “transient storage” in accordance with EIP-1153 specifications can further optimize the cost of accounting for these balances.

In summary, introducing “Flash Accounting” on the singleton contract structure not only improves cross-pool routing efficiency, but also further reduces the cost of transactions across multiple pools. This feature will become very useful after being hooked into the contract and supports more complex integrations and innovations, which will greatly increase the number of pools.

04 Native ETH: Simplify complexity, reduce barriers and improve user experience

According to the “Uniswap v4 Core WhiteBlockingper”, Native ETH pairs were removed from V2 due to concerns about implementation complexity and liquidity fragmentation. However, the implementation of singleton and flash accounting alleviates these problems, so V4 brings Native ETH back into trading and allows WETH to be paired with ETH.

In versions V2 and V3, users needed to convert their ETH to WETH before trading, which not only increased the entry barrier for beginners, but also incurred additional gas costs, resulting in a poor user experience. The gas cost of transferring native ETH is approximately half of that of ERC-20 transfers, with ETH at 21k gas and ERC-20s at around 40k gas. In V4, users can directly use native ETH for trading, saving gas fees. At the same time, since users no longer need to perform additional conversion operations, the convenience of trading has been enhanced.

Therefore, from the perspectives of entry barriers, trading costs, and convenience, the return of native ETH to the liquidity pool trading greatly improves the user experience.

05 Uniswap V4: Rebuilding the Liquidity Growth Flywheel to Plan for the Future Pattern

As a leading Dex protocol, Uniswap aims to realize the exchange and liquidity provision of digital assets. Uniswap has been constantly innovating around liquidity, and can be said to have always been imitated, never surpassed. Here, we will briefly review the innovations of V1-V3, and summarize the significance of V4 innovations for the Uniswap protocol itself and industry development.

Uniswap V1: In 2018, the automated market maker (AMM) model was introduced, which did not require buyers and sellers to match, and realized trading and liquidity provision through a fund pool and smart contract, making trading simpler and more efficient, and providing liquidity providers with profit opportunities.

Uniswap V2: In 2020, flash loan function was introduced, allowing users to borrow without providing funds. Liquidity LP tokens were also introduced, allowing liquidity providers to receive liquidity mining rewards and use LP tokens for staking and rewards in other protocols.

Uniswap V3: In 2021, the centralized liquidity model was realized using ERC721 NFT, allowing liquidity providers to choose to concentrate funds in narrower price ranges to achieve higher capital market efficiency. A tiered fee model was also introduced, allowing liquidity providers to set different fees in different price ranges to increase revenue.

From the iterative innovations of the three versions, it can be seen that Uniswap has always focused on liquidity and has been committed to improving capital efficiency and LP revenue, while maintaining its position as the largest DEX. According to data from Dune.com, the protocol currently has a 60% share of on-chain trading volume, more than three times that of its second largest competitor.

In V4, Uniswap continues to consolidate these advantages and builds up barriers through innovative initiatives such as Hooks, Singleton, and Flash Accounting, and continues to expand its competitive advantage in future development:

Give developers greater freedom to accelerate business innovation

As the core foundation of V4, Hooks will inspire developers to customize innovations for liquidity pools, create various decentralized financial products and services, provide users with more choices and value, and bring hundredfold flexibility and innovation space.

From the Factory/Pool multi-token multi-contract model to the Singleton large contract model, Uniswap essentially abstracts the core implementation logic from numerous liquidity product demands, and through Hooks, gives the initiative and innovation space to the community and developers, which is bound to attract more participants and innovate more liquidity businesses.

For developers, focusing on business logic on the basis of liquidity and security of Uniswap, and giving greater freedom, will undoubtedly bring more possibilities and application scenarios, such as dynamic handling fees, swap splitting based on time-weighted average market makers to achieve lower slippage, customized oracles, limit orders, on-chain quantitative trading strategies and liquidity rebalancing strategies, automatic handling fee reinvestment, etc.

Improve capital efficiency and optimize costs to squeeze out survival space of competitors

From the perspective of developers using liquidity pools : Various DeFi applications are similar to a front end, and the development of business requires underlying liquidity support. The difficulty is not in the development of DApp, but where your liquidity comes from? Hooks open up developers’ innovation space, and at the same time, the Singleton contract combined with Flash Accounting centralized liquidity pool provides superior guarantees for liquidity scale, depth, performance, efficiency, and cost for innovative businesses. Not only can it promote business-level innovation, but various business innovations will also increase the utilization rate of various assets in the liquidity pool.

From the management of LP and the acquisition of revenue : Liquidity providers only need to add or remove liquidity (LP) in one contract to participate in all currency pairs in the large contract. You only need to provide liquidity once and can freely choose and switch to various LP without the need to call the contract multiple times to pay gas fees, with high efficiency and low cost. At the same time, V4 has better incentives for LP than V3. The white paper mentions that donate() allows users, integrators, and hooks to directly pay liquidity providers in the pool with any one or two tokens in the pool. This new mechanism can internalize MEV into the returns of LP, allowing them to benefit from MEV, such as tipping liquidity providers in the range on TWAMM orders or new types of fee systems.

From the perspective of reducing transaction user fees: V4 is different from V3 in that each individual trading currency pair corresponds to a contract in V3, and users have to call the contract to charge Gas fees every time they trade a currency. In V4, all trading currency pairs are placed in one large contract. When users perform multi-hop transactions, they only need to call the contract once to complete all exchanges, saving costs and encouraging users to increase trading frequency.

From the perspective of inter-protocol competition: Free innovation space, efficient capital efficiency, simplified operation process, optimized cost and handling fees, etc., will help accelerate Uniswap’s aggregation of developers, liquidity providers, and trading users, thereby strengthening and expanding Uniswap’s competitive advantages. In addition, for DEX code copyists, the DEX fork is no longer competitive because Hooks can directly use existing liquidity resources without having to start from scratch; and for some existing DEXs, survival space will also be squeezed, such as cloud exchanges, routing class product applications, etc.

Shared liquidity accelerates protocol composability and infrastructure to promote the convergence of ten thousand flows

The centralized mode of Hooks+Singleton essentially shares liquidity for various businesses, which will further strengthen the liquidity aggregation of various assets; on this basis, it promotes business aggregation and enhances protocol composability, providing various DeFi functions, locking in the needs of different participants, and forming a one-stop experience and service. It can be said that through V4 innovation, Uniswap is making further progress in infrastructure and intends to form the momentum of “all streams converge to the same place”.

In summary, we believe that once V4 is officially released, Uniswap will recreate a liquidity growth flywheel. It is no longer just a DEX, it is moving from facing C-end to facing both C-end and B-end, accelerating the creation of a new infrastructure for sharing liquidity and becoming a public service platform for DeFi innovation.

We have reason to believe that Uniswap has a larger blueprint and will bring greater development space to DeFi. The emergence of V4 has triggered the final battle between DEX and CEX in the industry, and Uniswap is announcing the arrival of a new era with its innovative rhythm.

The future is already here, and we are looking forward to it.

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

Opinion

US SEC Chairman's pessimistic tone: Cryptocurrency businesses often non-compliant, filled with opacity and risk

During a Q&A session at the 27th annual Financial Markets Conference held by the Federal Reserve Bank of Atlanta ...

Blockchain

The Bitcoin exchange is very hot, but the soil of the economics is very thin.

According to the coinmarketcap market data, the trading volume of Bitcoin in the past month exceeded the intra-month ...

News

Who can take the lead in breaking the exchange contract?

Mark Lamb, CEO of CoinFLEX, predicts that by the end of 2020, the derivatives market will reach 20 times the size of ...

Blockchain

How many entities hold Bitcoin? These 7 exchanges are worth watching

Written by: Rafael Schultze-Kraft Translation: Lu Jiangfei Source: Chain News Problems with quantifying the number of...

Blockchain

Interviewed 800 crypto traders in 75 countries around the world. What did they find?

"Traders look for simplicity, but the exchange can't meet it. 80% of participants have entered the market f...

Blockchain

A brief history of crypto exchanges: a glimpse into the evolution of the most powerful organization in the blockchain industry

Written by: Nathaniel Whittemore & Clay Collins Compilation: Lu Jiangfei Source: ChainNews ChainNews I. Preface T...