Looking back at the evolution of various versions of UNI, how has UNI influenced blockchain?

CN
5 hours ago

Original Author: YBB Capital Researcher Zeke

Introduction

For Web3, I believe there are three significant historical moments: Bitcoin pioneered decentralized system blockchain, Ethereum's smart contracts provided imagination beyond blockchain payments, and UNI decentralized financial privileges, sounding the horn for the golden age of blockchain. From V1 to V4, from UNI X to UNI Chain, how far is UNI from the ultimate answer for Dex?

UNI V1: Prelude to the Golden Age

There were on-chain exchanges before UNI, but only after UNI could on-chain exchanges be called decentralized exchanges (Dex). Many articles attribute UNI's success to its simplicity, security, privacy, and being the pioneer of AMM; however, in my view, apart from simplicity, UNI's success is not significantly related to other factors. Unlike what most people know today, UNI was not the first on-chain exchange to adopt the AMM model; Bancor (the second-largest ICO project in blockchain history) existed before UNI, and exchanges using on-chain order book models had long been established. UNI was neither a pioneer nor the only on-chain exchange capable of achieving privacy and security; why could UNI take the lead? Let's first discuss Bancor, which was a leading on-chain exchange before UNI. In the early days, the popular EOS RAM and IBO (where B refers to the Bancor protocol) used algorithms or protocols provided by Bancor for asset issuance. The well-known constant product market maker (CPMM) was also first practiced by Bancor. As for why Bancor later failed to compete with UNI, there are many explanations in the materials I reviewed, some citing U.S. regulatory issues, others pointing to a less user-friendly experience than UNI, and deeper analyses comparing algorithms and protocol mechanisms. We won't delve too deeply into these issues here because, in my understanding, the logic behind UNI's late success is quite simple: it was the first Dex project that met the definition of DeFi. The AMM model was the only way at that time to democratize market-making and asset issuance; on-chain order book models or hybrid exchanges could never allow users to freely list tokens. On the other hand, users could not participate in market-making or provide liquidity to profit, leading to a general lack of trading pairs and slow transaction matching in such projects. Similarly, Bancor, which also adopted the AMM model, failed due to rigid liquidity and the requirement for Bancor's project team to approve token issuance, along with the need to pay listing fees. This project essentially still operated around the decision-making of centralized entities, failing to truly return "privileges" to users.

In my view, the early versions of UNI were not particularly user-friendly. There were significant short-term price fluctuations (one of the inherent problems of CPMM, where large instant trades could manipulate token prices), slippage due to the inability to directly swap between ERC20 tokens, high gas costs, lack of slippage protection, and missing various advanced features. Although AMM solved the liquidity shortage and slow transaction matching issues of Dex under the order book model at that time, it was still not comparable to Cex. The early users of the V1 version were not many, but its significance was historical. It was the first manifestation of financial democratization in Dex, an exchange without listing thresholds, and an exchange where liquidity came from the masses. It is precisely because of UNI's existence that Meme Tokens have become so popular today, and projects without top-tier team backgrounds can also shine on-chain. Some privileges that once belonged only to large financial institutions now exist in every corner of the blockchain.

Reviewing the evolution of UNI versions, how has UNI influenced blockchain?

UNI V2: DeFi Summer

The UNI V2 version was born in May 2020. Compared to today's "DeFi giants," the TVL of UNI V1 at that time was less than 40M. The improvements in the V2 version focused on the main shortcomings of V1, such as the previously mentioned short-term price manipulation and the need to use ETH as an intermediary for token exchanges. Additionally, a flash swap mechanism was introduced to enhance overall usability. The most noteworthy aspect of this version is UNI's approach to solving price manipulation. UNI first introduced a block-end price determination mechanism, using the price of the last transaction in each block as the price for that block. This means that an attacker must complete a transaction at the end of the previous block and then complete the arbitrage in the next block. To achieve this, the attacker must be able to perform selfish mining (i.e., concealing the block and not broadcasting it to the network) and continuously mine two blocks; otherwise, the price will be corrected by other arbitrageurs, which is nearly impossible to accomplish in practice, significantly increasing the cost and difficulty of the attack. Another point is the introduction of time-weighted average price (TWAP), which does not simply take the average price of the last few blocks but instead calculates a weighted average based on the duration of each price. For example, suppose the prices of a certain token pair in the last three blocks were:

  • Block 1: Price 10, Duration 15 seconds

  • Block 2: Price 12, Duration 17 seconds

  • Block 3: Price 11, Duration 16 seconds

Then the value at the end of Block 3 would be: 10 * 15 + 12 * 17 + 11 * 16 = 488. To calculate the TWAP for these three blocks, it would be 488 / (15 + 17 + 16) ≈ 11.11. Through this weighted average, short-term price fluctuations have a smaller impact on the final TWAP, requiring attackers to manipulate prices for a longer duration to affect the TWAP, thus increasing the cost and difficulty of the attack.

This approach can also be seen as an early effective method to combat MEV, and it also made AMM safer and more reliable, gradually establishing UNI as the mainstream choice for on-chain Dex. After discussing internal improvements, let's talk about external factors. UNI's rise during this period also had a certain element of luck. A key event occurred in June 2020, officially marking the beginning of the golden age of blockchain, commonly referred to as DeFi Summer. This event was triggered by the lending platform Compound Finance starting to reward both borrowers and lenders with Comp tokens, prompting other projects to follow suit, leading to what is known as "yield farming" or "liquidity mining" stacking investment opportunities (today's point actually belongs to the rogue version of liquidity mining). As a Dex with a very low listing threshold and the ability to actively add liquidity, UNI naturally became the first choice for various altcoin projects to mine. The situation of "gold miners" breaking through thresholds resembled the California Gold Rush of the mid-19th century, with a frenzy of liquidity pouring in, allowing UNI to firmly secure its position at the top of DeFi (the peak TVL of UNI v2 exceeded $10 billion on April 29, 2021). From this point on, DeFi gained immense popularity, and blockchain began to enter the mainstream.

Reviewing the evolution of UNI versions, how has UNI influenced blockchain?

UNI v3: The Long Road to Compete with Cex

By the time of V2, UNI had already become the standard answer for AMM-type Dex. It can be said that 99% of similar projects at that time had core architectures similar to UNI. At this point, UNI's enemy may no longer be Dex but Cex. Compared to the efficiency of centralized exchanges, a significant problem with AMM is low capital utilization. For ordinary users, providing liquidity for non-stablecoin trading pairs carries a substantial risk of impermanent loss. For example, during the DeFi summer of 2020-2021, it was common for users to see their principal wiped out in pursuit of liquidity mining rewards. If one wanted to continue profiting as an LP, the best choice was naturally stablecoin trading pairs, such as DAI-U, which led to a significant portion of the TVL having little practical utility. On the other hand, V2's liquidity was uniformly distributed across all price ranges from 0 to ∞, even if some price ranges had never been reached, liquidity still covered them, which was a manifestation of low capital utilization in V2.

To address this issue, the V3 version introduced concentrated liquidity. Unlike V2, where liquidity was evenly distributed across the entire price range, V3 allows LPs to concentrate their funds within specific price ranges of their choosing. LP's funds are only used within the selected price range, rather than being spread across the entire price curve. This allows LPs to provide the same liquidity depth with less capital or provide greater liquidity depth with the same amount of capital. This approach should be particularly beneficial for stablecoin trading pairs that trade within narrow ranges.

However, in practice, the effectiveness of V3 did not meet expectations. The reality is that most people choose to provide liquidity in the price ranges where they expect the most significant price fluctuations. This means that these high-yield ranges will attract a large influx of funds, causing capital accumulation, while other ranges still lack liquidity. Although the capital utilization efficiency of individual LPs improved, the overall distribution of funds remained uneven, and it did not significantly improve the low capital utilization issue in V2. In terms of liquidity efficiency, it was not as good as the price box proposed by Trader Joe during the same period, and in terms of optimizing stablecoin trading, it was not as effective as Curve. Moreover, with Layer 2 about to emerge, order book model Dexs are likely to regain a high position, and at this point, UNI had not yet realized its dream of conquering Cex, instead falling into an awkward "midlife crisis."

UNI V4: The Evolution of Many Hooks

UNI v4 is a significant update that occurred two years after V3. We have provided a more detailed analysis in our previous research reports, and I will briefly state it here. Compared to the V3 version from two years ago, the core of V4 lies in its pursuit of customization and efficiency. The V3 version introduced a concentrated liquidity mechanism to improve capital utilization, but the need for LPs to precisely select price ranges for trading positions presents certain limitations, making it easy to face liquidity shortages in extreme market conditions. In contrast, the Curve protocol and Trader Joe provide better options.

The update advantages of the V4 version lie in achieving the best balance between customization and efficiency, aiming for precision and capital utilization that surpass both. The most important mechanism is Hooks (also smart contracts), which grant developers unprecedented flexibility, allowing them to insert custom logic at critical points in the liquidity pool's lifecycle (e.g., before/after a trade, during LP deposits/withdrawals). This enables developers to create highly customized liquidity pools, such as supporting time-weighted average market makers (TWAMM), dynamic fees, on-chain limit orders, and interactions with lending protocols.

On the other hand, V4 adopted a Singleton structure to replace the Factory-Pool architecture that has been in use since V1, concentrating all liquidity pools in a single smart contract, allowing developers to build more of their own Lego blocks. This greatly reduces the Gas costs of creating liquidity pools and cross-pool transactions (by up to 99%) and introduces a "Flash Accounting" system to further optimize Gas efficiency. As an update at the end of the bear market in 2023, UNI v4 significantly regained its position, which had gradually been at a disadvantage in the AMM competition. However, the high customization of V4 also brings some issues. For instance, developers need to possess stronger technical skills to fully utilize the Hooks mechanism and must design carefully to avoid security vulnerabilities. Additionally, highly customized liquidity pools may lead to market fragmentation, reducing overall liquidity. In summary, V4 represents an important direction in the development of DeFi protocols—highly customized and efficient automated market maker services.

Reviewing the evolution of UNI versions, how has UNI influenced blockchain?

UNI Chain: Moving Towards Maximum Efficiency

UNI Chain is a major update recently announced, symbolizing that the future direction of Dex may be to become a public chain (though it confuses me that UNI Chain is not an application chain). UNI Chain is built on Optimism's OP Stack, with the core goal of enhancing transaction speed and security through innovative mechanisms, ultimately capturing the protocol's value to reward UNI token holders. Its core innovations are reflected in three aspects:

  1. Verifiable Block Construction: Utilizing Rollup-Boost technology in collaboration with Flashbots, combined with Trusted Execution Environment (TEE) and Flashblocks mechanisms, to achieve fast, secure, and verifiable block construction, reducing MEV risks, increasing transaction speed, and providing rollback protection;

  2. UNIchain Verification Network (UVN): Incentivizing validators to participate in block verification through UNI token staking, addressing the centralization risk of a single sequencer, and enhancing network security;

  3. Intent-Driven Interaction Model (ERC-7683): Simplifying user experience by automatically selecting the optimal cross-chain transaction path, addressing liquidity fragmentation and inter-chain interaction complexity, compatible with both OP Stack and non-OP Stack chains;

In simple terms, it focuses on anti-MEV, decentralized sequencers, and an intent-centered user experience. UNI becoming a part of the super chain will undoubtedly strengthen the OP alliance's influence again; however, this is not good news for Ethereum in the short term, as the divergence of the core protocol (with UNI accounting for 50% of Ethereum's transaction fees) will further exacerbate the fragmentation of Ethereum. But in the long run, this may be an important opportunity to validate Ethereum's rent-seeking model.

Conclusion

Currently, as the infrastructure for DeFi applications becomes increasingly saturated, more and more Dex are turning to order book models. No matter how simple AMM is, it cannot surpass the performance of order book models, and in terms of capital utilization, AMM will never be higher than that of order books. So will AMM disappear in the future? Some believe that AMM is merely a product of a special era, but I think AMM has become a totem of Web3. As long as Memes exist, AMM will exist; as long as bottom-up demand remains, AMM will exist. One day in the future, we may see UNI being surpassed, or even UNI launching an order book, but I believe this totem will always be preserved.

On the other hand, today's UNI is also becoming more centralized, with governance being vetoed by a16z and fees being charged on the front end without informing the community. One undeniable point is that the development approach of Web3 is at odds with human nature and reality. How should we coexist with these suddenly grown giants? This is a question we all must ponder.

References:

  1. UNIswap Documentation

  2. Revisiting the Bancor Algorithm: Why cw is a Failed Design

  3. UNIswapX Research Report: Summarizing the Development Path of V1-3, Interpreting the Principles and Innovations of the Next Generation DEX and Challenges

  4. UNIswap: From Zero to Infinity

  5. YBB Capital: Farewell to Fork Swap, is UNIswap V4 Entering the "Many Hooks" Era?

免责声明:本文章仅代表作者个人观点,不代表本平台的立场和观点。本文章仅供信息分享,不构成对任何人的任何投资建议。用户与作者之间的任何争议,与本平台无关。如网页中刊载的文章或图片涉及侵权,请提供相关的权利证明和身份证明发送邮件到support@aicoin.com,本平台相关工作人员将会进行核查。

Share To
APP

X

Telegram

Facebook

Reddit

CopyLink