🎉 Gate xStocks Trading is Now Live! Spot, Futures, and Alpha Zone – All Open!
📝 Share your trading experience or screenshots on Gate Square to unlock $1,000 rewards!
🎁 5 top Square creators * $100 Futures Voucher
🎉 Share your post on X – Top 10 posts by views * extra $50
How to Participate:
1️⃣ Follow Gate_Square
2️⃣ Make an original post (at least 20 words) with #Gate xStocks Trading Share#
3️⃣ If you share on Twitter, submit post link here: https://www.gate.com/questionnaire/6854
Note: You may submit the form multiple times. More posts, higher chances to win!
📅 July 3, 7:00 – July 9,
Talking about Uniswap V4: the master of DeFi innovation
The new version of Uniswap V4 has injected a catalyst into the cold and silent encryption industry in the bear market. Everyone agrees with the power of the Uniswap framework innovation paradigm, and is more confident that DEX will snatch liquidity from CEX in the future.
In fact, it all started with those 500 lines of code. As the gene and origin of DeFi, the AMM algorithm of **X*Y=K opened the "Cambrian Moment" of the DeFi industry. ** This algorithm realizes the automation of asset pricing and exchange, realizes risk hedging and arbitrage mechanism, realizes open and anti-censorship finance, and the most important thing is to realize the modular reorganization of financial business, so that finance can be combined and reconstructed like building blocks , Sow the seeds for the birth of various gameplays in the future.
**So compared to Uniswap V3, what improvements does V4 have? **
Some major changes in Uniswap V4 from V3
Just like the AMM that restructured Uniswap has only one contract, Uniswap V4 is called a "singleton" design mode, which can save gas to a large extent. In V3, each pool is a separate smart contract. In V4, all pools will be held in a single contract.
Using one contract for all pools means less gas. Swappers no longer need to transfer tokens between pools in different contracts, which can also accumulate multi-megabit routes! Some earlier estimates suggested that it would be about 99% cheaper to create a new pool this way than before.
By doing all the math we need** in one contract, Lightning Ledger saves gas by transferring tokens only on the net balance. In this way, the efficiency is higher and the gas cost is lower. **
The singleton architecture and flash accounting are also responsible for removing fee class restrictions. V3 has limited fee tiers to avoid fragmenting liquidity. It is now possible to set any swap fee and even change the fee dynamically!
**Uniswap V4's Hooks can add new functions and features to the AMM pool, and the Singleton contract changes the account framework and order logic. It is a framework innovation, and based on this, countless possibilities can be imagined. **
(Hooks is the core mechanism of Uniswap V4, which refers to a code fragment that runs at a specific moment in the life cycle of the fund pool. Compared with the previous version of Uniswap, the new version of the fund pool is more customizable, so whether you create Pool, or LP (liquidity provider) to add/remove liquidity, or before/after swap, the role of Hooks is very important.)
**But no matter how powerful Uniswap is, it is a master of innovation in the DeFi industry in the past 5 years. The innovative moments of many DeFi protocols in the past are also worthy of sharing and praise. **
Uniswap V4 integrates the power of DeFi
Let's take the new features of Uniswap V4 as an example to review the innovative forces that really exist in the DeFi world, starting with Uniswap, but not limited to Uniswap: **1) "Limit Order": ** At the end of 2020, dYdX implemented limit orders based on the "private order book" feature of its underlying StarkEx L2 extension protocol (by matching exchanges in the L2 hidden state, and then presenting the results in On the chain) This is quite different from the price limit logic under the V 3 Concentrated Liquidity model, but the limit order idea can reduce the risk of AMM orders and improve efficiency, which is a particularly important innovation in the development process of DeFi; **2) "TW AMM": **In July 2021, perpprotocol launched a time-weighted AMM model, which can adjust the Token ratio and price in the asset pool according to recent order records, which allows AMM to quickly and accurately respond to market prices change. Overall, the introduction of time weighting not only improves the efficiency of price discovery, but also enhances the ability to resist manipulation, making it difficult to manipulate AMM pricing through large orders. This is of great significance to the evolution of DeFi mechanisms. **3) "Dynamic rate": **In May 2021, GMX implemented a mechanism to dynamically adjust the order rate based on market conditions, which greatly improved the competitiveness and pricing efficiency of AMM products. GMX can realize the dynamic adjustment of the order fee driven by the algorithm, which is more sensitive and stable than the user-selected dynamic rate provided by Curve. This time, Uniswap V4 effectively combines algorithm-driven and manual selection, further improving the efficiency of liquidity utilization; **4) "NFT injection into AMM": **In December 2020, NFTX realized the deep integration of NFT and AMM, enabling NFT to conduct highly liquid orders and pricing in the AMM pool like ERC20 Token, thus solving the problem of The low liquidity problem of NFT. However, NFTX actually converts NFT into ERC20 Token and mortgages it to achieve liquidity, while Uniswap V4 directly allows NFT to participate in liquidity; **5) "Exceeding the scope of liquidity, borrowing interest on behalf of funds": ** In March 2021, Aave V2 realized the deposit of AMM's liquid assets in the Aave lending pool for borrowing to earn additional interest income, which is undoubtedly Improve the efficiency of the use of funds. The key is that it realizes the combined application of DeFi in cross-protocol and cross-mechanism, and opens up ideas for in-depth cooperation between DeFi protocols in the future; **6) "Automatic reinvestment of LP handling fees": **In October 2020, Curvefinance added an auto-compounding automatic compound interest mechanism in the V2 version, which can automatically convert the income of LP handling fees into LP Token and add to LP's position. However, in the face of price fluctuations, this mechanism will result in damage to the number of LP tokens swapped in. Even Uniswap V4 will inevitably have such challenges; **7) "Macro Contract Management Segmentation Liquidity Pool": **In 2020, the balancer realized the function of subdividing the flow pool through Vault contract management. This reduces the high cost of deploying a large number of single Token pools, and the Vault contract can avoid repeated reading and transfer to generate gas fees. The Singleton of Uniswap V4 is based on the concept of Vault, but it does not need to pre-define all combinations, which is more flexible; **8) "Introduction of Donate function": **In September 2020, Sushiswap launched the donation function for the first time in the V2 version, allowing users to donate Tokens to specific liquidity providers as an incentive. This is conducive to attracting and retaining more liquidity providers. Although this type of mechanism has a certain risk of commercial manipulation, it will be a new paradigm for the construction of the DeFi community driven by the community; In addition, perpprotocol can provide a lossless order mechanism throughout the process, relying on algorithms and complete pricing to reduce liquidity loss; mstable provides a mechanism for cross-chain asset fusion into liquidity, and users' assets on different chains can be merged into one liquidity mavprotocol can be customized according to user The annualized rate of return is defined by locking the Token period; many similar innovations are happening quietly, and may be adopted by Uniswap in the future.
summary
Uniswap has contributed to the prosperity of DeFi, but in fact, DeFi’s combined innovative micropower is also making Uniswap a little bit. It is precisely because of these mechanisms or concepts that have been explored successfully or failed time and time again that Uniswap’s V4 era is so bright. .