📢 Gate Square Exclusive: #PUBLIC Creative Contest# Is Now Live!
Join Gate Launchpool Round 297 — PublicAI (PUBLIC) and share your post on Gate Square for a chance to win from a 4,000 $PUBLIC prize pool
🎨 Event Period
Aug 18, 2025, 10:00 – Aug 22, 2025, 16:00 (UTC)
📌 How to Participate
Post original content on Gate Square related to PublicAI (PUBLIC) or the ongoing Launchpool event
Content must be at least 100 words (analysis, tutorials, creative graphics, reviews, etc.)
Add hashtag: #PUBLIC Creative Contest#
Include screenshots of your Launchpool participation (e.g., staking record, reward
Sort out the three major innovations of Uniswap V4
On June 13, Uniswap released the Uniswap V4 code draft. The vision of Uniswap V4 is to allow anyone to make these trade-off decisions by introducing "hooks". Hooks are contracts that run at various points in the lifecycle of pool operations, and pools can make the same tradeoffs as v3, or they can add entirely new functionality.
2 years ago, Uniswap V3 introduced centralized liquidity to improve capital efficiency. Today, Uniswap V4 is bringing customization and optimization to the AMM space. If you care about DeFi and its future, you should read this article for an in-depth look at Uniswap V4.
Since the birth of DeFi, Uniswap has been at the forefront of AMM innovation. In its 5-year history, Uniswap has undergone a total of 3 changes.
V1 = innovative ERC20-to-ETH liquidity pool and AMM;
V2 = enable ERC20/ERC20 liquidity pool and flash swap;
V3 = centralized liquidity.
With the launch of Uniswap V4, Uniswap will revolutionize the DeFi field with 3 new concepts, including:
"Hooks"
"The Singleton"
"Flash Accounting"
First, we need to understand the necessity of Uniswap V4. The lack of customizability has been an issue in the V2/V3 releases. Due to technical complexity, third-party developers have never been able to add volatility oracles and limit orders to V2/V3.
**What are Hooks? **
In V4, Uniswap tries to solve this problem through a new function called Hooks. Hooks are external smart contracts that can execute logic at different "key points" in the pool. The key point refers to the operation before/after Swap, or when LP deposits/withdraws, etc.
Through Hooks, liquidity pool creators can adjust pool parameters and introduce new features to AMMs. Not only that, but the implementation of Hooks can change the curve and allow various strategies to be built on top of Uniswap, ultimately benefiting LPs/swappers more.
Exemplary use cases include:
**・Create a limit order with the smallest possible price movement, known as a tick. **
**・By Time Weighted Average Market Maker (TWAMM) market making, the order itself is broken down into smaller parts. **
**・Dynamic fees are implemented during periods of high volatility to encourage balanced pools. **
Hooks could even allow customizing oracles and distributing internalized MEV to LP holders.
In addition, V4 has another feature called Action Hooks (Action Hooks), which can invoke logic during execution. Action hooks are contracts that are triggered and run only when the "Flag" condition is met and becomes "True".
Take the following flowchart as an example:
Before Swap, the contract will check Flag to evaluate the volatility of the fund pool; if the volatility is high, Flag will become "True" and run the action hook; if the volatility is not very high, Flag will become "False", and Swap will be executed as usual .
By doing this, action hooks implement a more gas-efficient way of determining which hooks to execute. V4 now allows action hooks to be implemented in 8 different scenarios:
Singleton Mode
On the other hand, the Singleton structure and Flash accounting will enable a cheaper transaction and deployment experience in V4. How is it achieved?
In V3, a new contract had to be deployed every time a liquidity pool was created, and deployment was very expensive. In V4, the singleton pattern keeps all pools in one contract, which makes pool deployment cost 99% lower than V3.
In V3, every transaction or LP pledge ends with a "transfer token" action. In short, every operation you need to transfer Token. This can cause the exchange to consume a large amount of gas fees during each operation.
Lightning accounting system
With the lightning ledger system in V4, each operation (swap/deploy) simply results in an internal balance update, where the balance is denominated in "delta". By the end of the swap, it will simply swap out the net "delta" balance after a series of calculations.
Since the liquidity pool manager does not need to own any tokens at the end of the transfer, the lightning accounting system ensures the solvency of the liquidity pool. Combined with the singleton pattern, this architecture can simplify multi-hop transactions and complex pool operations, making V4 more user-friendly.
Unfortunately, the lightning accounting model is still very expensive, because users need to pay gas fees for internal balance updates once the storage refund limit is exceeded. In order to reduce Gas fees, Uniswap needs to upgrade temporary storage from EIP-1153.
**What is temporary storage? **
In simple terms, temporary storage is a method of providing a temporary storage area in the transaction execution environment, which will disappear after the transaction is completed.
Ephemeral storage not only helps reduce overall gas costs, but also helps simplify smart contracts and improve the interaction between them.
Other notable upgrades from V4 include:
Restore native ETH swap;
Introduce the donation function (tips for liquidity providers, etc.);
** Governance update to control Swap fee cap. **
In short, Uniswap V4 provides a more customizable, flexible and efficient automated market maker than ever before. It is expected that more DApps will take advantage of the flexibility of V4 and design optimization strategies to benefit liquidity providers or improve capital efficiency.