Hello, everyone, I am Momo. As a learner of blockchain technology, I will organize and share my insights from the learning process in articles.
# 0x00 Introduction
On January 31, 2025, the Uniswap V4 version was officially launched, bringing many significant improvements and innovations. Previously, Momo had detailed the content related to the Uniswap V2 version. Today I, Momo, will briefly discuss the upgrades in Uniswap V4 and what expectations and changes future on-chain transactions can bring.
#UniswapV4 $UNI
# 0x01 Two Major Innovations
## Hooks Mechanism + Custom Accounting:
The Hooks mechanism allows developers to insert custom logic into the core protocol logic of Uniswap, enhancing the flexibility and scalability of the protocol. This enables upcoming on-chain transactions to be more flexible and diverse.
Custom Accounting allows developers to dynamically adjust the number of tokens or liquidity management rules through a hooks mechanism, rather than solely relying on Uniswap's default rules (the constant product formula x * y = k).

Momo believes this upgrade is the biggest highlight of the Uniswap V4 version, as this mechanism not only provides developers with unprecedented flexibility but also opens up infinite possibilities for the future development of decentralized finance (DeFi). With the help of Hooks, future on-chain pools will no longer be limited to simple transactions but can be transformed into complex financial products or financial derivatives. Combined with current trends such as real-world assets (RWA) and artificial intelligence (AI), the Hooks mechanism is expected to drive DeFi to further replace traditional finance.
Why do I say this? Let's take WeChat Mini Programs as an example. WeChat Mini Programs are essentially a development framework that, leveraging WeChat's vast user base and powerful social ecosystem, enables developers to create a variety of application scenarios and services on this platform, ranging from e-commerce shopping to financial services, from gaming entertainment to life services, covering all aspects of people's lives. Similarly, the Hooks mechanism in Uniswap V4 provides developers with a powerful underlying framework that allows them to build highly customized financial applications on this foundation.
## Optimizing the Gas Costs Required for Contract Execution:
Previously, executing transactions on the mainnet required a significant amount of gas, which made transaction costs very high. The high transaction fees not only limited the participation of ordinary users but also hindered the widespread adoption of DeFi applications. However, Uniswap V4 has undergone substantial optimizations this time, significantly reducing transaction costs.
Singleton Design: V4 adopts a single smart contract to manage all liquidity pools, rather than deploying a separate contract for each pool as in previous versions. This design reduces the complexity of contract deployment and management while lowering gas costs.
Flash Accounting: Some friends have translated this as lightning accounting, but Momo thinks that translating it as flash accounting is more appropriate because version V4 employs the transient storage feature of EIP-1153 during the transaction execution contract process. In multiple transactions, all intermediate balance changes are recorded in transient storage until the final balance change is calculated at the end of the transaction, which is then written to persistent storage (i.e., updating the global state) through SSTORE, thus significantly reducing the gas costs of writing and reading intermediate states.
Native ETH support: Version V4 supports direct transactions with native ETH during the transaction execution contract process, allowing users to avoid converting ETH into ERC-20 tokens, thereby reducing transaction steps and associated costs.

# 0x02 Thoughts
In 2025, Ethereum and its layer-2 networks will advance not only at the technical level but also in the prosperity of the ecosystem and the expansion of the user base. Uniswap has chosen to update in the new year, and Momo feels that this update will be an important milestone in the DeFi field and a significant step toward broader application and more efficient transactions for Ethereum.