Do you really understand Uniswap v4?Do you grasp Uniswap v4?
On June 13th, Uniswap Labs released a draft of Uniswap V4. Of course, first and foremost, the commercial copyright for V3 is about to expire, so you don’t need authorization to use it in other projects. The commercial copyright for V4 is 4 years, and V3 is 2 years. Secondly, the release of V4 is indeed an innovation worth paying attention to in the entire crypto bear market. We will explain the innovation of V4 in the most popular and easy-to-understand way for everyone.
1. HOOKS (the core of this innovation)
- In Uni V3, each pool corresponds to a contract, and is based on WETH as the trading pair. This greatly increases the transaction processing and creation costs. In V4, all pools will be placed in a singleton contract through hooks, and ETH trading pairs will be launched instead of WETH. The official estimate is that it will reduce 99% of creation gas. Efficient transactions can be made through the singleton contract.
- The architecture of the singleton contract will also be supplemented by a flash algorithm system based on eip-1153, which only transfers based on net balance-this means that a more efficient system can provide additional gas savings in Uniswap v4.
- With the efficiency of singletons and flash accounting, there is no longer a need to limit fee levels. Pool creators can set them at the most competitive level or customize them using dynamic fee hooks. v4 also brings back support for native ETH, which provides additional gas savings.
2. Custom diversity
Based on hooks, developers can “private customization” tokens. From the information officially released, it includes:
- Vitalik: In-depth Understanding of Cross-L2 Reading – What are the Cross-Chain Proof Solutions
- Why DeFi is Broken: The Importance of Non-Oracle Protocols
- CoinEx fined $1.7 million and reached a settlement with the New York State Attorney General’s Office (NYAG)
- Time-weighted average market maker (TWAMM)
Its working principle is to break down large orders into infinite small orders and smoothly execute them over a certain period of time through an AMM embedded with a constant product.
For example, suppose A wants to buy $50 million worth of ETH, but one or more large orders are very susceptible to sandwich attacks. Then the TWAMM mechanism can split his large order into countless small orders for trading, reducing the impact of sandwich attacks. The disadvantage is that the gas cost for relatively large orders on the chain is relatively high.
- Dynamic fees based on volatility or other inputs
Simply put, the cost of trading will vary depending on the size of the token volatility.
- On-chain limit order
You can place an on-chain order to achieve the same functionality as a CEX.
For example, A wants to sell ETH at a certain price, but may be affected by the price and trading frequency. For example, if he sees a price of 1900, but the price has dropped by the time he clicks sell, the transaction will fail and gas will be wasted. If he chooses to increase the slippage, he may successfully trade, but will be subject to sandwich attacks, and the selling price may be lower than the current price.
This also solves the pain point of the current DEX trading active tokens unable to accurately trade in wave bands, and there is no need to monitor the market all the time for active tokens.
- Deposit liquidity beyond the range into lending protocols
Liquidity providers can now deposit tokens into lending protocols beyond the pre-defined price range to explore opportunities for additional income. For example, if A chooses the ETH liquidity to be priced between 1500-1700, then once it exceeds this range, the remaining tokens will automatically be reinvested in the lending protocol to earn additional interest.
- Customized on-chain oracle, such as geomean oracle
- Automatically compound LP fees back into LP position
Part of the trading fees generated will flow back to the LP pool, providing liquidity providers with additional income.
- Internally distributed MEV profits back to LP
Developers can customize internalized MEV robots, and the profits generated are distributed to LP providers, similar to some meme projects on the BSC chain, where 2% of the 5% transaction tax is distributed to LP providers.
Simply put, limit orders in CEX and orders placed within a set time can be implemented on hooks. According to the official GitHub, it is possible to set a limit order before trading starts. If the conditions are met during the trading process, the transaction will be completed, otherwise it will be cancelled. For large orders, you can set time-based batch orders for buying and selling, which is equivalent to wave band operations of buying low and selling high on CEX.
Based on these innovative points, it can be seen that currently, for project parties, the chain can completely increase its trading volume through MEV, and for some deflationary gameplay, it can return to LP in part, not just profit from transaction fees. For meme-like projects, this is a major breakthrough, and many BSC chain plays can be used on the ETH chain. Currently, this is only a draft, and you can pay attention to the official version of the functionality, as well as meme-like projects based on these functions.
- Evolution of Uniswap: Opportunities and Impacts of V4
- What is Binance Chain’s Layer 2 network opBNB? Binance’s official interpretation
- Encrypted Exchange “Moving Trend”: US SEC “Forced Eviction” Middle East and Hong Kong “Welcoming with Smiling Faces”
- zkSync Dex Showdown: Syncswap vs iZiswap
- Comparison of the performance of Optimism and Arbitrum in the past three months
- Understanding DeFi Protocols Without Oracle
- Application and Progress of ERC-6551 “NFT Binding Account”