Uniswap V0
Uniswap V1 was launched in November 2018. However, in fact, the prototype of Uniswapd had been formed in the previous year. In 2017, founder Hayden resigned from Siemens, and his friend Karl who worked at the Ethereum Foundation comforted Hayden, "Mechanical engineering is a sunset industry, and Ethereum is the future." Under Karl's guidance, Hayden learned about Ethereum and Solidity, and created his Proof-of-something (Proof of concept AMM as they named it) in November 2017, which is Uniswap V0. This picture shows what Uniswap looked like at the beginning.

Before V1 was officially launched, Hayden used Balance and MakerDao's offices to work on V0. At the end of July 2018, Uniswap officially received the Grant from the Ethereum Foundation.
Uniswap V1
On November 2, 2018, the last day of the Devcon 4 conference, Uniswap’s smart contracts were officially deployed on the Ethereum mainnet. At that time, only $30,000 of funds flowed in, and as the initial liquidity of the three tokens, it could only provide a trading depth of $100. Subsequently, uniswap.io and app.uniswap.org/# were also launched.
In September 2019, Uniswap V1 ushered in the first liquidity mining project, which was based on ERC-20 tokens. During the V1 period, the trading volume and user scale were relatively small. As the first version of the Uniswap protocol, V1 adopted a mechanism based on automatic market makers (AMM), allowing users to conduct unlicensed token transactions on the Ethereum blockchain without an order book. This version adopts a constant product model, which simply means that the product of the balances of the two tokens in the trading pair remains unchanged.
Uniswap V1's innovative mechanism provides users with a fast and convenient way to trade tokens, getting rid of the dependence on traditional centralized exchanges. It laid a solid foundation for subsequent versions of Uniswap and also became an inspiration for other AMM protocols. However, Uniswap V1 did not attract much attention from users at the time.

Uniswap V2
In May 2020, Uniswap V2 made its debut! This was a major upgrade that caused a sensation in the cryptocurrency community. In September 2020, SushiSwap came out, attracting countless attention and users, which really made Uniswap begin to attract market attention.
Compared with Uniswap V1, Uniswap V2 brings a series of significant improvements. Most importantly, it introduces trading of multiple token pairs, making trading pairs more flexible and diverse. No longer limited to exchanging with Ethereum (ETH), now ERC-20 tokens can also be exchanged with each other! In addition, Uniswap V2 also introduces the time-weighted average price (TWAP) oracle, which is a major breakthrough!
The launch of Uniswap V2 consolidates Uniswap's leading position in the decentralized trading space. It provides users with more functionality and flexibility, allowing them to better manage liquidity and conduct a wider variety of transactions. It is the emergence of Uniswap V2 that has driven the rapid development of decentralized finance (DeFi) and provided users with an important source of liquidity.

Uniswap V3
Uniswap V3 was launched in May 2021, bringing the new concept of "centralized liquidity". This concept allows liquidity providers to define specific price ranges in trading pairs, thereby controlling prices more precisely. In this way, liquidity providers can obtain more transaction fee income and reduce the opportunities for arbitrageurs to trade on price differences.
At the same time, Uniswap V3 also expands the oracle of Uniswap V2 and optimizes the calculation method and gas efficiency of the TWAP oracle. The V3 oracle extends the data availability period to 9 days or even longer through a single on-chain call. And through the overall optimization of TWAP, V3 reduces the gas consumption by about 50% compared to V2. Simple transactions will be about 30% cheaper than transactions with the same functions in V2.
In addition, Uniswap V2 uses a standard 0.3% transaction fee, while V3 provides 3 independent fee levels: 0.05%, 0.3% and 1%. This allows liquidity providers to choose a pool of funds based on the risk they are willing to take. V3 also introduced for the first time the use of NFTs as LPs (liquidity providers) to provide liquidity proof, that is, the liquidity provided is tracked by non-homogeneous ERC721 tokens.
The launch of Uniswap V3 has had a significant impact in the DeFi ecosystem. It provides liquidity providers with more options and better opportunities for earnings while improving transaction efficiency. Uniswap V3 has also driven innovation in decentralized trading and led other exchanges and protocols to work hard to improve user experience and reduce transaction costs. However, passive liquidity providers have been criticized for being squeezed out of their revenue space by instant traders and professional market makers.
Uniswap V4 — Hooks Change Everything
As soon as the white paper draft of Uniswap V4 was released, the market gave it a full interpretation. It mainly mentioned optimizations such as Hook, Singleton, Flash Accounting and native ETH, among which Hook is the most important innovation of V4. Hook of Uniswap V4 may become the most powerful tool for building liquidity. In the future, the cost of building a DeFi platform and combining liquidity will be greatly reduced.
Hooks
In simple terms, Hooks contracts are contracts that call other smart contracts and execute logic in the transaction lifecycle. These logics can be implemented by user-defined contracts and called at critical moments.

Uniswap V4 introduces a new contract called "Hooks", which is called at several key moments, providing developers with more custom functions and innovation space. These key moments include:
onSwap: Called when a swap occurs. It can be used to record transaction information, perform specific operations, or modify custom logic such as transaction fees.
onMint: called when a liquidity provider adds liquidity to the pool, and can be used to record relevant information or perform specific operations.
onBurn: called when a liquidity provider withdraws liquidity from the pool, and can be used to record relevant information or perform specific operations.
Previously, liquidity pool developers could only customize LP and LP fees, but V4's Hooks allow developers to have more room for innovation based on Uniswap's liquidity and security. Uniswap Labs demonstrated a range of possibilities and revealed the unique features of the product, including:
Time-weighted average market maker (TWAMM).
Dynamic fees based on volatility or other values.
On-chain price limit order.
Out-of-scope liquidity is deposited into the lending protocol.
Custom on-chain oracles, such as geomean oracles.
Automatically reinvest LP fees into LP positions.
The built-in MEV (miner extractable value) profits are distributed to LPs.
Uniswap V4 further enhances the status of liquidity infrastructure through these optimizations and improves capital efficiency. However, the problem of uncompensated loss (IL) of centralized liquidity still exists.
IL is an inherent problem of AMMs, and it occurs whenever the prices of two assets deviate from their initial prices. For centralized liquidity mechanisms such as Uni V3 and V4, the IL problem is particularly severe due to high gamma in a narrow range, and is particularly evident when providing liquidity in highly volatile markets or between low-correlated assets.
The current solutions to IL include using protocol token subsidies, implementing dynamic fee structures, setting up insurance funds, and using hedging mechanisms. These methods are all indirect ways to alleviate the IL problem.
Uniswap V4's dynamic transaction fees, optimized oracle prices, and more LP subsidies (such as MEV subsidies and automatic reinvestment fees, etc.) indirectly compensate LP's IL losses to some extent.
Regarding security and contract complexity, the core logic of Uniswap V4 is the same as V3 and cannot be upgraded. Although each pool can use its own Hooks smart contract and enrich the functionality of Uniswap V4 and achieve more combinatorial possibilities through external contract calls, these calls are limited to specific permissions determined at pool creation. Excessive external contract calls will increase gas fees, so for simple swaps, Uniswap V4 may not be cheaper than V3/V2. This is the trade-off between complexity and composability.
Uniswap V4 also introduced the concept of "Singleton" contract, which saves all liquidity pools in one contract, greatly saving Gas fees. In addition, V4 also introduced a fast accounting system, which only transfers assets on the net balance, improving the efficiency of the system and saving Gas fees.
in conclusion
Uniswap V4 is an important milestone towards the development of true DeFi infrastructure. For developers, it provides an experimental platform full of unlimited imagination. They can carry out various interesting explorations on Uniswap V4.
For liquidity providers (LPs), adding liquidity will become more customized and convenient. For ordinary users, creating a trading pool is more economical and provides more trading options. For example, they can choose to use V2, V3 or V4 according to their needs, because each version has its own unique advantages. The V2 contract is simple and easy to understand, and the transaction fee for a single pool is relatively low; while the V4 structure is more complicated, it can help users save a lot of gas fees when multiple pools need to be called at the same time.
The continued development of the DeFi industry will continue to promote the optimization of liquidity management methods. For project parties, the Donate() function introduced by Uniswap V4 can help them achieve the goal of liquidity management and increase the liquidity of the project by bribing liquidity providers. In addition, the hook function of Uniswap V4 may become the most powerful tool for building liquidity, reducing the cost of building a DeFi platform and combining liquidity.
The emergence of Uniswap V4 will have a significant impact on the future DeFi landscape. Although the code of V4 has not yet been finalized and reviewed, and it will take some time to be officially released, this time window is an opportunity for many protocols to develop their own liquidity and adjust their development direction. In any case, people's expectations for Uniswap V4 are increasing day by day, and I believe it will bring new possibilities and changes to the DeFi industry.